<?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>O! Mr Speaker!</title>
	<atom:link href="http://www.mrspeaker.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mrspeaker.net</link>
	<description>Javascript flâneur, internet flibbertygibbert</description>
	<lastBuildDate>Fri, 29 Jan 2010 00:34:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>iPadmé. Geddit?</title>
		<link>http://www.mrspeaker.net/2010/01/29/ipadme/</link>
		<comments>http://www.mrspeaker.net/2010/01/29/ipadme/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 00:34:01 +0000</pubDate>
		<dc:creator>Mr Speaker</dc:creator>
				<category><![CDATA[Nerd]]></category>

		<guid isPermaLink="false">http://www.mrspeaker.net/?p=1452</guid>
		<description><![CDATA[
C&#8217;mon&#8230; it&#8217;s only the second star wars joke I&#8217;ve made in 5 years.
]]></description>
			<content:encoded><![CDATA[<p><img src="/images/iPadme.png" title="iPadmé" /><br />
C&#8217;mon&#8230; it&#8217;s only the second star wars joke I&#8217;ve made in 5 years.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mrspeaker.net/2010/01/29/ipadme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sine Scrollbars</title>
		<link>http://www.mrspeaker.net/2010/01/18/sine-scrollbars/</link>
		<comments>http://www.mrspeaker.net/2010/01/18/sine-scrollbars/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 07:03:55 +0000</pubDate>
		<dc:creator>Mr Speaker</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.mrspeaker.net/?p=1441</guid>
		<description><![CDATA[
Here&#8217;s a lil&#8217; Scrollbar Experiment. It&#8217;s pretty. 
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mrspeaker.net/dev/sinescrollbars/" title="sine scrollbars"><img src="/images/scrollbars.png" alt="Sine Scrollbars" /></a><br />
Here&#8217;s a lil&#8217; <a href="http://www.mrspeaker.net/dev/sinescrollbars/" title="sine scrollbars">Scrollbar Experiment</a>. It&#8217;s pretty. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.mrspeaker.net/2010/01/18/sine-scrollbars/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>jQuery 1.4 iPhone reference app</title>
		<link>http://www.mrspeaker.net/2010/01/14/jquery-iphone-reference/</link>
		<comments>http://www.mrspeaker.net/2010/01/14/jquery-iphone-reference/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 00:16:23 +0000</pubDate>
		<dc:creator>Mr Speaker</dc:creator>
				<category><![CDATA[Nerd]]></category>

		<guid isPermaLink="false">http://www.mrspeaker.net/?p=1423</guid>
		<description><![CDATA[Welcome to the year twenty hundred and ten! As a very early christmas present, the jQuery team have announced they&#8217;ll be dropping the 1.4 release on us in the next couple of days. They&#8217;ve also unveiled a new documentation effort. 
To help you get your head around the reams of new information, I&#8217;ve created a [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/images/jqref.png" alt="jQuery 1.4 reference app" class="frame-right" style="border:0" />Welcome to the year twenty hundred and ten! As a very early christmas present, the jQuery team have announced they&#8217;ll be dropping the 1.4 release on us in the next couple of days. They&#8217;ve also unveiled a <a href="http://api.jquery.com/" title="jQuery docs">new documentation</a> effort. </p>
<p>To help you get your head around the reams of new information, I&#8217;ve created a neat-o reference app for your iPhone &#8211; so now you&#8217;ve got no excuse not to know what <code>jQuery.noop</code>, <code>.nextUntil()</code>, or <code>.unwrap()</code> does!</p>
<p>To install it, <a href="http://www.mrspeaker.net/dev/jq/ref/" title="jQuery 1.4 reference app">go here on your iPhone</a> then click &#8220;+&#8221; and &#8220;Add to Home Screen&#8221; for fullscreen app-y goodness.<br />
<span id="more-1423"></span><br />
<strong>Please note!</strong> there are about 350 files to download, so installing will take a couple of minutes &#8211; and during those couple of minutes you can&#8217;t let your phone fall asleep else <del>Freddy will come</del> your phone&#8217;s WiFi will turn off and the files won&#8217;t be cached.</p>
<p>The application uses the <a href="http://www.jqtouch.com/">jQuery touch</a> plugin to appear all native-y, and the offline abilities of HTML5 to store the data for when you feel like reading jQuery docs on the bus. </p>
<p>The material is taken from the new docs &#8211; which are being changed <em>a lot</em> at the moment, so I&#8217;ll update this thing again when it all settles down a bit (I won&#8217;t be doing constant updates, because I don&#8217;t think you can invalidate individual files in the cache manifest, so you have to get all 350 files again for <em>any</em> changes). </p>
<p>I&#8217;m sure that at the moment some methods that will be missing or incomplete &#8211; because of my dodgy parsing, changing docs, and poor QA skills&#8230; fixed in the next version fo&#8217; sure ;)</p>
<p>That&#8217;s it&#8230; go to <a href="http://www.mrspeaker.net/dev/jq/ref/" title="jQuery 1.4 reference app">http://www.mrspeaker.net/dev/jq/ref/</a> on your iPhone then click the &#8220;+&#8221; button and &#8220;Add to Home Screen&#8221; to install.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mrspeaker.net/2010/01/14/jquery-iphone-reference/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>.index() becomes cool in jQuery 1.4</title>
		<link>http://www.mrspeaker.net/2009/12/05/index-in-jquery/</link>
		<comments>http://www.mrspeaker.net/2009/12/05/index-in-jquery/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 06:28:57 +0000</pubDate>
		<dc:creator>Mr Speaker</dc:creator>
				<category><![CDATA[Nerd]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.mrspeaker.net/?p=1411</guid>
		<description><![CDATA[With jQuery 1.4 just around the corner, it&#8217;s time to start looking at what&#8217;s new. One nice change is the updated functionality of the index method. Previously, well, it was a pain in the bum to get the index of an element in a selection &#8211; and required a pretty convoluted syntax. Now it&#8217;s super [...]]]></description>
			<content:encoded><![CDATA[<p>With jQuery 1.4 just around the corner, it&#8217;s time to start looking at what&#8217;s new. One nice change is the updated functionality of the <code>index</code> method. Previously, well, it was a pain in the bum to get the index of an element in a selection &#8211; and required a pretty convoluted syntax. Now it&#8217;s super easy&#8230; <code>$(this).index()</code>. Let&#8217;s have a look at a &#8216;lil example:</p>
<p><span id="more-1411"></span>Say we have an unordered list of items:
<pre><code>&lt;ul id="tags"&gt;
	&lt;li&gt;jQuery&lt;/li&gt;
	&lt;li&gt;Javascript&lt;/li&gt;
	&lt;li&gt;reference&lt;/li&gt;
	...
&lt;/ul&gt;</code></pre>
<p>The user can click on a list item to select it. When a click happens, we need to find out what the item&#8217;s index is, relative to all its siblings&#8230;.
<pre><code>$("#tags li").click(function(){
    alert( "Hi, I'm element " + $(this).index() );
});</code></pre>
<p>That&#8217;s all there is to it. Super useful!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mrspeaker.net/2009/12/05/index-in-jquery/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Parcycle: A Particle System with HTML5 canvas</title>
		<link>http://www.mrspeaker.net/2009/12/03/particle-system-with-html5-canvas/</link>
		<comments>http://www.mrspeaker.net/2009/12/03/particle-system-with-html5-canvas/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 22:51:28 +0000</pubDate>
		<dc:creator>Mr Speaker</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Nerd]]></category>

		<guid isPermaLink="false">http://www.mrspeaker.net/?p=1381</guid>
		<description><![CDATA[All this PPK &#8220;iPhone developers are stupid&#8221; awesomeness got me thinking. Now, if there&#8217;s one guy I&#8217;ve got respect for, it&#8217;s PPK. And if he tells me to ditch objective-c for JavaScript, then I&#8217;m damn well going to do it. Accordingly, I decide to create &#8220;Parcycle&#8220;: a Particle Emitter system that I re-wrote from a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mrspeaker.net/dev/parcycle/"><img src="/images/particle.png" class="frame-right" /></a>All this PPK <a href="http://www.quirksmode.org/blog/archives/2009/11/apple_is_not_ev.html">&#8220;iPhone developers are stupid&#8221;</a> awesomeness got me thinking. Now, if there&#8217;s one guy I&#8217;ve got <a href="http://www.mrspeaker.net/2009/11/27/ppk-vs-degrassi-jnr-high/">respect</a> for, it&#8217;s PPK. And if he tells me to ditch objective-c for JavaScript, then I&#8217;m damn well going to do it. Accordingly, I decide to create &#8220;<a href="http://www.mrspeaker.net/dev/parcycle/">Parcycle</a>&#8220;: a Particle Emitter system that I re-wrote from a set of great openGL <a href="http://www.71squared.com/iphone-tutorials/">iPhone tutorials</a> by the good guys at 71Squared.</p>
<p><a style="font-size:12pt;" href="http://www.mrspeaker.net/dev/parcycle/">See the wonders of HTML5 Canvas!!</a></p>
<p>(here&#8217;s a proof-of-concept version as an <a href="http://www.mrspeaker.net/dev/iparcycle">offline iPhone Web app</a>)</p>
<p><span id="more-1381"></span>After updating an old JavaScript platformer to <a href="http://www.mrspeaker.net/2009/11/28/javascript-iphone-games/">work on the iPhone</a>, I decided to step it up a notch. A full-featured Particle System: lots of particles, lots of colours, lots of fluffy clouds of pixels! I ported the 71Squared Particle Emitter code pretty-much directly: in fact, a bunch of it was straight copy/paste &#8211; I just had to change &#8220;-&gt;&#8221; to &#8220;.&#8221;. Well, mostly. </p>
<p>&#8230;actually, the real reason for this undertaking was because I just learned about the &#8220;lighter&#8221; value for the canvas <code>globalCompositeOperation</code>. In this mode, when you draw two things on top of each other the overlapping area will become lighter. Which makes the particles look fully-sick.</p>
<p>The particle system itself is straightforward enough, so I thought I&#8217;d tack on a couple of extra bits &#8211; I added a couple of extra parameters, made it bouncy, and also let you (kind of) save and load data. If you click the save icon you can copy/paste out the current parameters &#8211; and as an added bonus, the data is a very re-tweetable form. </p>
<p>&#8220;Why would you tweet it?&#8221; you ask, incredulously. Well&#8230; if you click the &#8220;Twitter&#8221; button, then it will search Twitter&#8217;s public search service for saved &#8220;files&#8221;: these are just tweets with lots of numbers and the #parcycle hash tag. Any saved settings get loaded them into the example containers, so you can see what other people have made. Pretty groovy &#8211; annnd, I don&#8217;t have to worry about writing any server-side nonsense. Win-win!</p>
<p>I&#8217;m going to write a cut-down version for use on future iPhone Web games. Even my dodgy first-pass seems to function reasonably well with a hand-full of particles: with some optimizing it should be good enough to get rid of objective-c forever!*</p>
<p>So anyway, go <a style="font-size:12pt;" href="http://www.mrspeaker.net/dev/parcycle/">See the wonders of HTML5 Canvas!!</a></p>
<p>*No.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mrspeaker.net/2009/12/03/particle-system-with-html5-canvas/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>JavaScript iPhone Games: Part II</title>
		<link>http://www.mrspeaker.net/2009/11/28/javascript-iphone-games/</link>
		<comments>http://www.mrspeaker.net/2009/11/28/javascript-iphone-games/#comments</comments>
		<pubDate>Sat, 28 Nov 2009 09:06:50 +0000</pubDate>
		<dc:creator>Mr Speaker</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Nerd]]></category>

		<guid isPermaLink="false">http://www.mrspeaker.net/?p=1361</guid>
		<description><![CDATA[Interesting JavaScript times abound! Recently the Pie Guy JavaScript iPhone game has provided a sneak-peek at what we can do with the awesome one-two punch of ECMAScript and the iPhone. Accordingly, I went back and applied some pie-guy tricks to my platformer&#8230;
It doesn&#8217;t use the HTML5 client storage stuff (yet) Thanks to the damn-cool offline-storage [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/dev/iplat/images/appIcon.png" alt="mr speaker icon" class="frame-right" />Interesting JavaScript times abound! Recently the <a href="http://mrgan.tumblr.com/post/257187093/pie-guy">Pie Guy</a> JavaScript iPhone game has provided a sneak-peek at what we can do with the awesome one-two punch of ECMAScript and the iPhone. Accordingly, I went back and applied some pie-guy tricks to <a href="http://www.mrspeaker.net/dev/iplat">my platformer</a>&#8230;</p>
<p><span id="more-1361"></span><del>It doesn&#8217;t use the HTML5 client storage stuff (yet)</del> Thanks to the damn-cool offline-storage stuff it works off-line, but it doesn&#8217;t do nice rotation handling (yet)&#8230; I fixed the controls &#8211; by adding two &#8220;d-pads&#8221; instead of swipes &#8211; and made it all landscapey. To use it on the iPhone or iPod Touch you should browse to the game then add it to your home screen.</p>
<p><a href="http://www.mrspeaker.net/dev/iplat">Go play!</a></p>
<p>(Also, if anyone wants to take the <a href="http://www.mrspeaker.net/dev/iplat/images/tiles.png">tiles.png</a> file and the <a href="http://www.mrspeaker.net/dev/iplat/images/characters.png">characters.png</a> file and make the game not look so crap&#8230; that&#8217;d be awesome!)</p>
<p>(Also, also, I just thought I&#8217;d point out that my game was called <a href="http://www.mrspeaker.net/2009/07/12/more-javascript-madness/">&#8220;Some adventure guy&#8221;</a> since before Pie Guy existed. Promise I didn&#8217;t steal it. Promise.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mrspeaker.net/2009/11/28/javascript-iphone-games/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PPK vs Degrassi Junior High</title>
		<link>http://www.mrspeaker.net/2009/11/27/ppk-vs-degrassi-jnr-high/</link>
		<comments>http://www.mrspeaker.net/2009/11/27/ppk-vs-degrassi-jnr-high/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 07:07:41 +0000</pubDate>
		<dc:creator>Mr Speaker</dc:creator>
				<category><![CDATA[Nerd]]></category>

		<guid isPermaLink="false">http://www.mrspeaker.net/?p=1350</guid>
		<description><![CDATA[
Shocking discovery uncovered by Henry.
]]></description>
			<content:encoded><![CDATA[<p><img src="/images/ppk1.png" /><img src="/images/ppk2.png" /><br />
<span style="font-size:7pt">Shocking discovery uncovered by <a href="http://www.henrytapia.com">Henry</a>.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mrspeaker.net/2009/11/27/ppk-vs-degrassi-jnr-high/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Nifty jQuery trick: setting attributes</title>
		<link>http://www.mrspeaker.net/2009/11/26/nifty-jquery-trick-attr/</link>
		<comments>http://www.mrspeaker.net/2009/11/26/nifty-jquery-trick-attr/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 00:39:23 +0000</pubDate>
		<dc:creator>Mr Speaker</dc:creator>
				<category><![CDATA[Dictaphone]]></category>
		<category><![CDATA[Nerd]]></category>

		<guid isPermaLink="false">http://www.mrspeaker.net/?p=1340</guid>
		<description><![CDATA[I&#8217;ve been knee deep in the jQuery source code recently. It&#8217;s all gooey, but you do get to see some snazzy things. Today&#8217;s nifty jQuery trick is about programmatically setting attribute values via a function. To follow along at home you&#8217;ll need some scissors, a length of string, and some double sided tape&#8230;
We all know [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been knee deep in the jQuery source code recently. It&#8217;s all gooey, but you do get to see some snazzy things. Today&#8217;s nifty jQuery trick is about programmatically setting attribute values via a function. To follow along at home you&#8217;ll need some scissors, a length of string, and some double sided tape&#8230;</p>
<p><span id="more-1340"></span>We all know that you can grab attribute values using jQuery&#8217;s <code>attr</code> method. For example, to check if a checkbox is checked you check the checkbox&#8217;s checked, um, value:<br />
<code>var checked = $("chkNoMail").attr("checked");</code><br />
And, of course, to set attributes we simply pass the value in as the second parameter: <code>$("&lt;div&gt;&lt;/div&gt;").attr("id", "myDiv1");</code><br />
Ok, ok&#8230; buuuut, there&#8217;s also <em>another</em> version of the <code>attr</code> method that accepts not a lowly string&#8230; but a mighty function!</p>
<p>The function can implement whatever logic you want, but it needs to return the value that you want the attribute to have. For example, if you want to invert the &#8220;selected&#8221; values of a multi-select box:
<pre><code>$("selBox").children()
		.attr( "selected", function(){
			return !$(this).attr( "selected" );
		});</code></pre>
<p>Nice! Certainly saves us an extra <em>.each</em> call, and keeps your jQuery gravy-train going. It can also be used to add IDs to a bunch of elements you need to ID:</p>
<pre><code>$("div").attr( "id", function( i ){
	return "myDiv" + i;
}</code></pre>
<p>End tip.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mrspeaker.net/2009/11/26/nifty-jquery-trick-attr/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The road to jQuery 1.4: at a glance</title>
		<link>http://www.mrspeaker.net/2009/11/20/the-road-to-jquery-1-4-at-a-glance/</link>
		<comments>http://www.mrspeaker.net/2009/11/20/the-road-to-jquery-1-4-at-a-glance/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 09:13:13 +0000</pubDate>
		<dc:creator>Mr Speaker</dc:creator>
				<category><![CDATA[Nerd]]></category>

		<guid isPermaLink="false">http://www.mrspeaker.net/?p=1326</guid>
		<description><![CDATA[
Ok, here&#8217;s something you&#8217;ll want to refer to daily&#8230; the current status of the jQuery 1.4 &#8220;TODO list&#8221;, or as I like to call it, &#8220;Report 37&#8220;. Usually when people on the jQuery dev lists ask &#8220;When will jQuery 1.4 be ready?&#8221; they are met with a resigned (resigned not resiged) answer: &#8220;When it&#8217;s ready&#8221;. [...]]]></description>
			<content:encoded><![CDATA[<div style='float:right;padding:10px 10px 10px 0'><object width="160" height="130"><param name="movie" value="http://www.youtube.com/v/zvd3kaupZ60&#038;hl=en_US&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/zvd3kaupZ60&#038;hl=en_US&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="160" height="130"></embed></object></div>
<p>Ok, here&#8217;s something you&#8217;ll want to refer to daily&#8230; the current status of the jQuery 1.4 &#8220;TODO list&#8221;, or as I like to call it, &#8220;<a href="http://dev.jquery.com/report/37">Report 37</a>&#8220;. Usually when people on the jQuery dev lists ask &#8220;When will jQuery 1.4 be ready?&#8221; they are met with a resigned (<em>resigned</em> not <em>resiged</em>) answer: &#8220;When it&#8217;s ready&#8221;. But we don&#8217;t have to take that kind of glib-ness anymore&#8230;</p>
<p><span id="more-1326"></span>Now we can go and consult good ol&#8217; Report 37 any time we need an ETA on 1.4. The method is simple: when all the red and white stripes turn light blue &#8211; then jQuery&#8217;s ready to go! Of course, looking at all those lines takes up precious time and brain space &#8211; so I&#8217;ve compacted the data into a single image, so you can see how things are going at a glance.</p>
<p>Assuming this page has completed loading without JavaScript errors (a big assumption), you should see the Licorice Allsort graph to the right. The black lines mark the different components of the jQuery build: Ajax, Core, Event, FX, etc&#8230; The coloured lines are the status of the tickets. We want everything to turn blue, if only so there isn&#8217;t so much pink on my blog.</p>
<p>To make the pretty pictures, I grab the report once a day, and dump it on my server. Then your browser goes all jQuery on it &#8211; loading it in and extracting relevant colour information. Then the super awesome <a href="http://raphaeljs.com/">Raphael SVG library</a> makes some pixels, and we all have a cup of tea.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mrspeaker.net/2009/11/20/the-road-to-jquery-1-4-at-a-glance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding &#8220;1UP notification&#8221; with jQuery</title>
		<link>http://www.mrspeaker.net/2009/11/16/1up-notification/</link>
		<comments>http://www.mrspeaker.net/2009/11/16/1up-notification/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 06:56:56 +0000</pubDate>
		<dc:creator>Mr Speaker</dc:creator>
				<category><![CDATA[Nerd]]></category>

		<guid isPermaLink="false">http://www.mrspeaker.net/?p=1213</guid>
		<description><![CDATA[Now, as many of you know, I&#8217;m a big fan of taking interactions from retro gaming and attempting to squish them onto the page as standard UI elements. If I had my way, all sites would look like BMX Simulator from the C64. With that in mind&#8230; today something great happened. A win for old-school-gaming-as-ui-elements [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/images/marioscore.png" class="frame-right" alt="mario score" />Now, as many of you know, I&#8217;m a <em>big</em> fan of taking interactions from retro gaming and attempting to squish them onto the page as standard UI elements. If I had my way, <em>all</em> sites would look like BMX Simulator from the C64. With that in mind&#8230; today something great happened. A win for old-school-gaming-as-ui-elements unmatched since CSS sprites were invented: <a href="http://adactio.com/journal/1626/">Jeremy Keith&#8217;s 1UP notifications</a>! Don&#8217;t simply let your user know they&#8217;ve &#8220;added a friend&#8221;, let them feel like they &#8220;added a friend&#8221; <em>AND</em> scored 1000 points! 1UP notifications just <em>have</em> to storm the web with their awesomeness, and we need to do our best to help them.</p>
<div id="oneupTest"><span>Get some points:</span><span id="btnScore">GO!</span><span id="txtScore">1000</span></div>
<p><span id="more-1213"></span>Of course, you won&#8217;t have &#8220;1000&#8243; popping up&#8230; you&#8217;ll have &#8220;added&#8221; or &#8220;removed&#8221; or &#8220;dugggg&#8221; or something a bit useful to the end user. I don&#8217;t care about end users, so <em>I&#8217;ll</em> have &#8220;1000&#8243;.</p>
<p>In the spirit of trying to get the effect to take over the web, I thought I&#8217;d throw together a jQuery plugin for sticking them on your site. The <a href="http://www.mrspeaker.net/dev/jq/jquery.oneup.js">jquery.oneup.js plugin</a> is very straightforward &#8211; it just animates an element upwards while fading out: 1UP style! To use it, just make your typical notification element <code>position:relative</code>, or <code>position:absolute</code> &#8211; whatever it takes to make it movable! (I&#8217;ll fix this in the next version). For the demo, I&#8217;ve styled my notification message like so:</p>
<pre><code>...
&lt;input type="submit" id="go" value="go" /&gt;
&lt;span id="loadn"&gt;load&lt;/span&gt;
...
#loadn{
	position:relative;
	left:-30px;
	top:-4px;
	display:none;
}</pre>
<p></code>The element then sits "invisibled" over the "go" button, ready to fly... Next we wire up our 1UP functionality with the plugin:<br />
<code>
<pre>$("#go").click(function(){
	$("#loadn").oneUp();
});</code></pre>
<p>YES! That is so cool: check it <a href="http://www.mrspeaker.net/dev/jq/1UP/">in action</a>. The plugin accepts parameters <code>speed</code> (as a jQuery time - like, 'slow', 'fast' or 1000) and <code>distance</code> (how many pixels it travels upwards). You can also specify a callback if you need to do something after the notification completes (like in the demo).</p>
<p>Well, I'm pretty stoked with this turn of events. I've got to go back through every single site I've ever done and add way-too-many of these lil' fellows in. The <a href="http://www.mrspeaker.net/dev/jq/jquery.oneup.js">jquery.oneup.js</a> plugin needs a bit of work: so it handles positioning all by itself, and so forth... I'll let you know as soon as that's done. But in the mean time, I've got a highscore to go beat...</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mrspeaker.net/2009/11/16/1up-notification/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
