<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.1" -->
<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/"
	>

<channel>
	<title>blog@tomauger.com</title>
	<link>http://www.tomauger.com/blog</link>
	<description>Development news, browser quirks, design factoids. Good stuff.</description>
	<pubDate>Thu, 14 Aug 2008 22:00:02 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>
	<language>en</language>
			<item>
		<title>ActionScript 2.0 - MovieClip &#8220;Bring to Front&#8221;</title>
		<link>http://www.tomauger.com/blog/2008/07/09/actionscript-20-movieclip-bring-to-front/</link>
		<comments>http://www.tomauger.com/blog/2008/07/09/actionscript-20-movieclip-bring-to-front/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 20:53:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Tips and Tricks]]></category>

		<category><![CDATA[Flash / ActionScript]]></category>

		<guid isPermaLink="false">http://www.tomauger.com/blog/2008/07/09/actionscript-20-movieclip-bring-to-front/</guid>
		<description><![CDATA[To me this seems like a basic problem in many Flash-based interfaces. I think Adobe did too, which is why in AS3 they completely revamped their approach to layering display objects.
This leaves those of us stuck back in AS2.0-land (because some customers insist they want their Flash published as FlashPlayer 8! ) scratching our heads. [...]]]></description>
			<content:encoded><![CDATA[<p>To me this seems like a basic problem in many Flash-based interfaces. I think Adobe did too, which is why in AS3 they completely revamped their approach to layering display objects.</p>
<p>This leaves those of us stuck back in AS2.0-land (because some customers insist they want their Flash published as FlashPlayer 8! ) scratching our heads. Kirupa, Senocular and other worthies have come up with an interesting technique which keeps a &#8220;top-layer&#8221; counter, increments it by 2 every time you want to swap depths. While this works perfectly well, there&#8217;s something about the technique that, to me (no offense guys: you&#8217;re genii), seems like quick-and-dirty (with the emphasis on dirty) code. At some point, I reason, one just HAS to hit that upper layer limit. I&#8217;m sure it&#8217;s like layer 65538 or something, but still - since you&#8217;re using SwapDepths() anyway, why can&#8217;t you just find that currently top MovieClip and swap the one you want with it. That way you&#8217;re never increasing the top layer count and away you go.</p>
<p>So here&#8217;s my take on a bringToFront function. (Note: this is an update to the previous version with some substantial improvements).</p>
<p>Here I&#8217;ve added the bringToFront function to the MovieClip prototype, so that you can use it with any movieclip as if it were a native method, like this: myMC.bringToFront();</p>
<p> <a href="http://www.tomauger.com/blog/2008/07/09/actionscript-20-movieclip-bring-to-front/#more-11" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tomauger.com/blog/2008/07/09/actionscript-20-movieclip-bring-to-front/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ActionScript 2.0 and Custom Cursors: using a Second-order Predictor (Acceleration) to Detect When Mouse Leaves the Stage</title>
		<link>http://www.tomauger.com/blog/2008/07/02/actionscript-20-and-custom-cursors-using-a-second-order-predictor-acceleration-to-detect-when-mouse-leaves-the-stage/</link>
		<comments>http://www.tomauger.com/blog/2008/07/02/actionscript-20-and-custom-cursors-using-a-second-order-predictor-acceleration-to-detect-when-mouse-leaves-the-stage/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 00:23:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Tips and Tricks]]></category>

		<category><![CDATA[Flash / ActionScript]]></category>

		<guid isPermaLink="false">http://www.tomauger.com/blog/2008/07/02/actionscript-20-and-custom-cursors-using-a-second-order-predictor-acceleration-to-detect-when-mouse-leaves-the-stage/</guid>
		<description><![CDATA[Can you believe it? You go through the pain of creating a custom cursor in Flash, and then when the user does something pesky like roll the mouse outside the Flash area, your custom cursor (which is really nothing more than a MovieClip that follows your cursor in disguise) stays in its last-known position - [...]]]></description>
			<content:encoded><![CDATA[<p>Can you believe it? You go through the pain of creating a custom cursor in Flash, and then when the user does something pesky like roll the mouse outside the Flash area, your custom cursor (which is really nothing more than a MovieClip that follows your cursor in disguise) stays in its last-known position - wedged somewhere near one of the outer boundaries of your stage, but definitely not looking right, since the &#8220;real&#8221; mouse is now happily tracking (or whatever it is real mice do) somewhere else on the screen. Two cursors, one big egg in your beer.</p>
<p>After doing some research, it seems the most advanced thinking on the subject (other than those crackpots who tell you to look to external JavaScript to solve the problem - which is bogus) is to use a first-order predictor (velocity) to &#8220;guess&#8221; (well, &#8220;predict&#8221; to be precise) where the mouse would be during the next poll. Well, I tried to implement that and I found that the results left somewhat to be desired. Considerably somewhat.</p>
<p>The way this &#8220;first-order prediction&#8221; business works is: once the mouse leaves the stage, _root.xmouse and _root.ymouse no longer give us meaningful information, because Flash is unable to track the mouse position outside of its own &#8220;domain&#8221;. So if you&#8217;re relying on, say a test to see whether _root.xmouse &gt; 0 to detect whether your cursor has exited stage left, you&#8217;re SOL - _root.xmouse will still be reading 4, or 10 or wherever your mouse was LAST time it checked. So what we want to do is to <em>predict</em> where the mouse will be next time, based on where it was last time. In other words: <strong>velocity</strong>. That&#8217;s your &#8220;first-order predictor&#8221;. And boy does it look good. At first.<br />
As you may or may not remember from your grade X Physics class (I actually didn&#8217;t remember - I was too busy oogling my teachers emphatic retort to Newton&#8217;s law of gravity - yeah, you Centennial CVI boys know what I&#8217;m talking about) velocity can be measured as the change in distance (&#8221;delta&#8221;) between two points over time. Now since we&#8217;re not really dealing with time per se as much as mouse movement over a frame, the equation is simplified quite a bit. As in vx = x2 - x1. So now, if you want to see whether the mouse <em>will be</em> off to the left of the stage, you can just add the velocity into your test to see whether _root.xmouse + vx &gt; 0. Following me? Of course you are.</p>
<p>But, just so I can be clear for myself: if the first time we checked the xmouse was at, say 5 (near the left of the stage) and the second time (now) it&#8217;s at 2, x2 - x1 = 2 - 5 = -3. So now we check to see where it will be next time: _xmouse + vs = 2 + (-3) = 2 - 3 = -1 &lt; 0. Great. So the mouse is off the stage. Roll drums, toot horns.</p>
<p>The problem occurs when you &#8220;flick&#8221; the mouse rapidly off the stage. What&#8217;s happening is that now our velocity is changing rapidly, which means that our prediction underestimates where the next position will be, and usually undershoots the mark. If you think about it, you&#8217;re not moving the mouse, then all of a sudden you flick it to the left. But, since the mouse is a physical object, it&#8217;s subject to the laws of physics, as are you, and so the mouse doesn&#8217;t really go from 0 - 60 in an instant. Like a car, it accelerates. Which means that the velocity is increasing over time - so our wonderful first-order prediction is hokey because it&#8217;s basing its calculation on a constant velocity.</p>
<p>So I took it one step further and used acceleration in the calculation, rather than velocity. Or rather, in the second poll I still use velocity (because you need three coordinates to calculate acceleration, and at the second poll we only have two points), but in the third poll I discard the velocity predictor for my second-order predictor and get much more accurate results.</p>
<p>Enough mumb-jumbo. Give us the code already, right?<br />
 <a href="http://www.tomauger.com/blog/2008/07/02/actionscript-20-and-custom-cursors-using-a-second-order-predictor-acceleration-to-detect-when-mouse-leaves-the-stage/#more-10" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tomauger.com/blog/2008/07/02/actionscript-20-and-custom-cursors-using-a-second-order-predictor-acceleration-to-detect-when-mouse-leaves-the-stage/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CSS Horizontal Menu: Firefox whitespace bug</title>
		<link>http://www.tomauger.com/blog/2008/06/22/css-horizontal-menu-firefox-whitespace-bug/</link>
		<comments>http://www.tomauger.com/blog/2008/06/22/css-horizontal-menu-firefox-whitespace-bug/#comments</comments>
		<pubDate>Mon, 23 Jun 2008 02:17:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[XHTML]]></category>

		<category><![CDATA[Tips and Tricks]]></category>

		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.tomauger.com/blog/2008/06/22/css-horizontal-menu-firefox-whitespace-bug/</guid>
		<description><![CDATA[So I came across the most baffling bug the other day that locked me up for a good three hours. I thought maybe I&#8217;d just put down what I discovered here on the outer reaches of the blogosphere in case anyone else happens to hit that magical combination of Google keywords and a link to [...]]]></description>
			<content:encoded><![CDATA[<p>So I came across the most baffling bug the other day that locked me up for a good three hours. I thought maybe I&#8217;d just put down what I discovered here on the outer reaches of the blogosphere in case anyone else happens to hit that magical combination of Google keywords and a link to this page comes up.</p>
<p>To describe the problem succinctly: when you&#8217;re trying to create a horizontal menu using unordered lists (&lt;ul&gt; and inline &lt;li&gt;), for some reason, in Firefox (2 - I don&#8217;t know about 3 which just came out last week), if there is any whitespace between a closing &lt;/li&gt; tag and the opening &lt;li&gt; tag of the next item, that whitespace actually displays. At first it looks like a margin spacing issue, but after some tests it&#8217;s clearly not. In fact, what baffles me is that ANY text between the closing &lt;/li&gt; and the opening &lt;li&gt;, that text actually gets displayed inline! Which makes no sense, because I didn&#8217;t think that the &lt;ul&gt; element could have a text node as a direct child. Apparently it can, in Firefox at any rate.</p>
<p>The solution, as I have discovered is to set your &lt;ul&gt;&#8217;s display attribute to &#8220;table&#8221;. I don&#8217;t believe IE7 and certainly not IE6 understand display:table, so this is a non-IE fix, but then again, IE wasn&#8217;t exhibiting the whitespace behaviour. Here&#8217;s some sample code.</p>
<pre> &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"</pre>
<pre>	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;</pre>
<pre>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;</pre>
<pre>&lt;head&gt;</pre>
<pre>&lt;title&gt;Untitled Document&lt;/title&gt;</pre>
<pre>
&lt;style type="text/css"&gt;</pre>
<pre>    *    { margin:0; padding:0; }</pre>
<pre>
    ul {</pre>
<pre>        list-style-type:none;</pre>
<pre>        list-style-position:inside;</pre>
<pre>        margin:0px; padding:0px;</pre>
<pre>        display:table; /* This is used for firefox */</pre>
<pre>	/* to avoid the horizontal whitespace bug */</pre>
<pre>    }</pre>
<pre></pre>
<pre>    li {</pre>
<pre>        border:1px solid black;</pre>
<pre>        display:inline;</pre>
<pre>        margin:0px; padding:0px;</pre>
<pre>        border-collapse:collapse;</pre>
<pre>    }</pre>
<pre></pre>
<pre>    a {</pre>
<pre></pre>
<pre>    }</pre>
<pre></pre>
<pre>&lt;/style&gt;</pre>
<pre></pre>
<pre>&lt;/head&gt;</pre>
<pre>
&lt;body&gt;</pre>
<pre>    &lt;ul&gt;</pre>
<pre>        &lt;li&gt;&lt;a href="#"&gt;Line 1&lt;/a&gt;&lt;/li&gt;</pre>
<pre>        &lt;li&gt;&lt;a href="#"&gt;Line 2&lt;/a&gt;&lt;/li&gt;</pre>
<pre>        &lt;li&gt;&lt;a href="#"&gt;Line 3&lt;/a&gt;&lt;/li&gt;</pre>
<pre>    &lt;/ul&gt;</pre>
<pre>    &lt;p&gt;Other stuff....&lt;/p&gt;</pre>
<pre>&lt;/body&gt;</pre>
<pre>&lt;/html&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.tomauger.com/blog/2008/06/22/css-horizontal-menu-firefox-whitespace-bug/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Interoperability between two Flash EXE Projectors (or how to dynamically read SharedObjects across two SWFs)</title>
		<link>http://www.tomauger.com/blog/2008/06/07/interoperability-between-two-flash-exe-projectors-or-how-to-dynamically-read-sharedobjects-across-two-swfs/</link>
		<comments>http://www.tomauger.com/blog/2008/06/07/interoperability-between-two-flash-exe-projectors-or-how-to-dynamically-read-sharedobjects-across-two-swfs/#comments</comments>
		<pubDate>Sat, 07 Jun 2008 15:37:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[Tips and Tricks]]></category>

		<category><![CDATA[Flash / ActionScript]]></category>

		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.tomauger.com/blog/2008/06/07/interoperability-between-two-flash-exe-projectors-or-how-to-dynamically-read-sharedobjects-across-two-swfs/</guid>
		<description><![CDATA[So here&#8217;s a real doozie that came from a question someone asked on ExpertsExchange: he had two separate Flash Projectors (EXEs) - that needed to be able to intercommunicate (the first projector needed to know when the second projector had actually finished loading). Since we&#8217;re dealing with external projector files that have no dependencies (rather [...]]]></description>
			<content:encoded><![CDATA[<p>So here&#8217;s a real doozie that came from a question someone asked on <a target="_blank" href="http://www.experts-exchange.com/Q_23465924.html">ExpertsExchange</a>: he had two separate Flash Projectors (EXEs) - that needed to be able to intercommunicate (the first projector needed to know when the second projector had actually finished loading). Since we&#8217;re dealing with external projector files that have no dependencies (rather than using the movieClipLoader to load an external SWF into the parent movie), the only thing I could think of that would work reliably was local SharedObjects.</p>
<p>As I put together a solution for this brave soul, I encountered a few interesting challenges, and a few frustrations. Thought I&#8217;d document it here because I couldn&#8217;t find anyone else who had addresses the intricacies of having two SWF share a SharedObject and monitor the status of that shared SharedObject so they could respond to a change in status.</p>
<p>Here&#8217;s the basic principle:</p>
<ul>
<li>Application 1 creates a local SharedObject and sets an initial status</li>
<li>Application 1 also registers an enterFrame event listener that listens for a status change on the SO</li>
<li>Application 2 accesses the same SO and at some point, changes the status</li>
<li>Application 1&#8217;s enterFrame handler detects the status change, and responds to the event.</li>
</ul>
<p>As I write this, I see there&#8217;s an opportunity for a custom event class that does all this, but I&#8217;m going to leave that to the real gurus. I don&#8217;t pretend to have that intimate a knowledge of ActionScript to be able to pull that off. I should also point out at this time that the original EE user&#8217;s question was for AS2, so this solution is only tested in AS2, though since the issues I was running into were related to variable scope, I would only imaging that an AS3 implementation would be easier, if anything.</p>
<p>Here are the challenges I encountered:</p>
<ul>
<li>how to launch one EXE Projector from another EXE Projector</li>
<li>how to share a SharedObject between two Flash movies (SWFs)</li>
<li>how to continuously monitor the value of a shared SharedObject</li>
</ul>
<p> <a href="http://www.tomauger.com/blog/2008/06/07/interoperability-between-two-flash-exe-projectors-or-how-to-dynamically-read-sharedobjects-across-two-swfs/#more-8" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tomauger.com/blog/2008/06/07/interoperability-between-two-flash-exe-projectors-or-how-to-dynamically-read-sharedobjects-across-two-swfs/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Cool Zeitguys Apparel on Zazzle.com</title>
		<link>http://www.tomauger.com/blog/2008/05/24/cool-zeitguys-apparel-on-zazzlecom/</link>
		<comments>http://www.tomauger.com/blog/2008/05/24/cool-zeitguys-apparel-on-zazzlecom/#comments</comments>
		<pubDate>Sat, 24 May 2008 15:24:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.tomauger.com/blog/2008/05/24/cool-zeitguys-apparel-on-zazzlecom/</guid>
		<description><![CDATA[Oh man, I&#8217;ve done it. I&#8217;ve gone out and started to create an online fashion store. Intense.
 Zeitguys is such a cool name, and I&#8217;ve always thought it would be neat to call our employees a &#8220;zeitguy&#8221;, so I came up with these shirts. Then I just went nuts and I realized, hey, other people might [...]]]></description>
			<content:encoded><![CDATA[<p>Oh man, I&#8217;ve done it. I&#8217;ve gone out and started to create an online fashion store. Intense.</p>
<p> Zeitguys is such a cool name, and I&#8217;ve always thought it would be neat to call our employees a &#8220;zeitguy&#8221;, so I came up with these shirts. Then I just went nuts and I realized, hey, other people might think this was cool too. So the <a target="_blank" href="http://www.zazzle.com/zeitguys" title="Cool Zeitguys apparel at zazzle.com">Zeitguys Apparel</a> store at Zazzle.com was born.</p>
<p>Check it out! The stuff&#8217;s not expensive, shipping is cheap, and if you&#8217;re at all geeky, you might get a kick out of our newest: the propellerhead &#8220;I&#8217;m hip. I&#8217;m with it&#8221; or the glasses with [iiii] (four eyes - get it???). I slay me.</p>
<p>Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tomauger.com/blog/2008/05/24/cool-zeitguys-apparel-on-zazzlecom/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Creating a pop-up window that only displays once per user</title>
		<link>http://www.tomauger.com/blog/2007/09/18/creating-a-pop-up-window-that-only-displays-once-per-user/</link>
		<comments>http://www.tomauger.com/blog/2007/09/18/creating-a-pop-up-window-that-only-displays-once-per-user/#comments</comments>
		<pubDate>Tue, 18 Sep 2007 15:20:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[XHTML]]></category>

		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[Tips and Tricks]]></category>

		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.tomauger.com/blog/2007/09/18/creating-a-pop-up-window-that-only-displays-once-per-user/</guid>
		<description><![CDATA[This was a question I answered recently on experts-exchange, and, considering the verbosity of it all, I thought I&#8217;d capture it for anyone that might find it useful.
 The poster wanted to create a popup window using HTML and JavaScript that would open when the page first loaded, but then, if the user navigates away from [...]]]></description>
			<content:encoded><![CDATA[<p>This was a question I answered recently on <a target="_blank" href="http://www.experts-exchange.com">experts-exchange</a>, and, considering the verbosity of it all, I thought I&#8217;d capture it for anyone that might find it useful.</p>
<p> The poster wanted to create a popup window using HTML and JavaScript that would open when the page first loaded, but then, if the user navigates away from that page, and then came back, would not bother them by popping up again.</p>
<p> Here&#8217;s the solution:</p>
<p>The command for a popup window is:<br />
window.open();</p>
<p>To make the window open when the user first comes to your page, you put the popup in the HTML &lt;body&gt; tag like this:</p>
<p>&lt;body onLoad=&#8221;window.open();&#8221;&gt;</p>
<p>There are some additional parameters you can pass to window.open() to do things like set the name, the size etc.</p>
<p>If you want to make sure the popup only happens once per session for a user (so it doesn&#8217;t pop up every time) you need to set a session cookie.</p>
<p>The session cookie is stored on the person&#8217;s computer and is erased once they close their browser window. This is useful for making sure that the NEXT time they visit the site, they will see the popup again.</p>
<p>If you don&#8217;t want the user to ever see the popup again after the first time, use a regular cookie that doesn&#8217;t expire, or expires in a very long time.</p>
<p>These are some excellent tutorials on setting and reading cookies. You&#8217;ll have to brush up on your JavaScript skills a little.</p>
<p><a rel="nofollow" target="_blank" href="http://www.quirksmode.org/js/cookies.html" onclick="return openNew(this.href);"><font color="#6b6b6b">http://www.quirksmode.org/js/cookies.htm<wbr></wbr>l</font></a><br />
<a rel="nofollow" target="_blank" href="http://www.w3schools.com/js/js_cookies.asp" onclick="return openNew(this.href);"><font color="#6b6b6b">http://www.w3schools.com/js/js_cookies.a<wbr></wbr>sp</font></a></p>
<p>For a general tutorial on JavaScript, check these guys out:<br />
<a rel="nofollow" target="_blank" href="http://www.w3schools.com/js/default.asp" onclick="return openNew(this.href);"><font color="#6b6b6b">http://www.w3schools.com/js/default.asp</font></a></p>
<p>Here are all the parameters you can pass to window.open to do all sorts of neat things with the popup window. This page is a little technical, so maybe wait until you&#8217;ve got a basic window working before trying to tweak the popup window with help from this link:<br />
<a rel="nofollow" target="_blank" href="http://www.w3schools.com/htmldom/met_win_open.asp" onclick="return openNew(this.href);"><font color="#6b6b6b">http://www.w3schools.com/htmldom/met_win<wbr></wbr>_open.asp</font></a></p>
<p>Cookies will probably be the hardest part for you to implement. So I&#8217;m just going to copy and paste some code here, straight out of the w3schools tutorial, with a bit of explanation and some specific code for you:</p>
<p>first, in the &lt;head&gt; of your HTML page, start with your &lt;script&gt; tag:</p>
<p>&lt;script type=&#8221;text/javascript&#8221; language=&#8221;JavaScript&#8221;&gt;<br />
// the rest will go inside here (see below)</p>
<p>&lt;/script&gt;</p>
<p>Okay, now, copy and paste the following functions into the area we&#8217;ve left for the Script tags.</p>
<p>function mySetCookie(c_name,value,expiredays)<br />
{var exdate=new Date()exdate.setDate(exdate.getDate()+ex<wbr></wbr>piredays)<br />
document.cookie=c_name+ &#8220;=&#8221; +escape(value)+<br />
((expiredays==null) ? &#8220;&#8221; : &#8220;;expires=&#8221;+exdate.toGMTString())<br />
}</p>
<p>function myGetCookie(c_name)<br />
{<br />
if (document.cookie.length&gt;0)<br />
  {<br />
  c_start=document.cookie.indexOf(c_name + &#8220;=&#8221;)<br />
  if (c_start!=-1)<br />
    {<br />
    c_start=c_start + c_name.length+1<br />
    c_end=document.cookie.indexOf(&#8221;;&#8221;,c_star<wbr></wbr>t)<br />
    if (c_end==-1) c_end=document.cookie.length<br />
    return unescape(document.cookie.substring(c_sta<wbr></wbr>rt,c_end))<wbr></wbr><br />
    }<br />
  }<br />
return &#8220;&#8221;<br />
}</p>
<p>// &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<wbr></wbr></p>
<p>Okay, those are the functions we&#8217;ll use to set and retrieve the cookie to see if the user has already seen the popup window.</p>
<p>Now here&#8217;s the custom code that you&#8217;ll put after the code you just copied and pasted (still inside the SCRIPT tags). We want to check if the user has already got a cookie. If so, it means the user has already been to this page and (presumably) seen the popup already, so we don&#8217;t display it again. Otherwise, we display it.</p>
<p>function showPopupOnce() {<br />
   var hasSeenPopup = myGetCookie(&#8221;has_seen_popup&#8221;);<br />
  if (hasSeenPopup == null || hasSeenPopup == &#8220;&#8221;){<br />
     // the user has never seen the popup, so show him!<br />
    window.open(&#8221;<a rel="nofollow" target="_blank" href="http://mywebsite.com/popup.html" onclick="return openNew(this.href);"><font color="#777777">http://mywebsite.com/popup.<wbr></wbr>html</font></a>&#8220;, &#8220;myPopupWindow&#8221;);<br />
   }</p>
<p>   // either way, set the cookie so the user will never see the window again<br />
   mySetCookie(&#8221;has_seen_popup&#8221;, &#8220;true&#8221;, 365); // 365 days = 1 year<br />
}</p>
<p>// &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>Okay, great, now the only thing to do is make sure that the showPopupOnce() function runs whenever the page loads. Go into the &lt;body&gt; tag and change it to this:<br />
&lt;body onLoad=&#8221;showPopupOnce();&#8221;&gt;</p>
<p>That should do the trick.</p>
<p>Tom</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tomauger.com/blog/2007/09/18/creating-a-pop-up-window-that-only-displays-once-per-user/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Free Music Album Download at Magnatune</title>
		<link>http://www.tomauger.com/blog/2007/08/03/free-music-album-download-at-magnatune/</link>
		<comments>http://www.tomauger.com/blog/2007/08/03/free-music-album-download-at-magnatune/#comments</comments>
		<pubDate>Fri, 03 Aug 2007 20:44:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Music]]></category>

		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.tomauger.com/blog/2007/08/03/free-music-album-download-at-magnatune/</guid>
		<description><![CDATA[I&#8217;ve been a huge fan of Magnatune for a long time. Magnatune CEO John Buckman says it best: &#8220;We are not evil&#8221;. Perfect audio quality, no digital rights management, pay what you want, and most importantly, the artists get 50% of the proceeds. They are truly not evil.
 Now it gets better. Every month they will feature [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been a huge fan of <a target="_blank" href="http://magnatune.com/">Magnatune</a> for a long time. Magnatune CEO John Buckman says it best: &#8220;We are not evil&#8221;. Perfect audio quality, no digital rights management, pay what you want, and most importantly, the artists get 50% of the proceeds. They are truly not evil.</p>
<p> Now it gets better. Every month they will feature a new, full album for free <a target="_blank" href="http://magnatune.com/freemusic">download</a>. Come check it out <a target="_blank" href="http://magnatune.com/freemusic">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tomauger.com/blog/2007/08/03/free-music-album-download-at-magnatune/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Pairing a Bluetooth Headset (Motorola H350)</title>
		<link>http://www.tomauger.com/blog/2007/07/31/pairing-a-bluetooth-headset-motorola-h350/</link>
		<comments>http://www.tomauger.com/blog/2007/07/31/pairing-a-bluetooth-headset-motorola-h350/#comments</comments>
		<pubDate>Tue, 31 Jul 2007 13:30:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Obscurica]]></category>

		<category><![CDATA[Technology]]></category>

		<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://www.tomauger.com/blog/2007/07/31/pairing-a-bluetooth-headset-motorola-h350/</guid>
		<description><![CDATA[I had to hunt around for this piece of information, so I&#8217;m posting it here for posterity. I have a Motorola V361 cellphone and the accompanying Motorola H350 Bluetooth Headset. But no manuals. Never having used any Bluetooth device in my life, let alone this Borg-like implant, I just couldn&#8217;t get anything to work.
Here are some [...]]]></description>
			<content:encoded><![CDATA[<p>I had to hunt around for <a target="_blank" href="http://www.epinions.com/content_390991679108" title="this">this </a>piece of information, so I&#8217;m posting it here for posterity. I have a <a target="_blank" href="http://www.cellphones.ca/cell-phones/phone/391/">Motorola V361</a> cellphone and the accompanying <a target="_blank" href="http://reviews.cnet.com/bluetooth-headsets/motorola-h350-headset/4505-12523_7-32057309.html">Motorola H350 Bluetooth Headset</a>. But no manuals. Never having used any Bluetooth device in my life, let alone this Borg-like implant, I just couldn&#8217;t get anything to work.</p>
<p>Here are some lessons learned:</p>
<ul>
<li>Make sure you enable Bluetooth in your cellphone first. It defaults to off. The <a target="_blank" href="http://www.cellphones.ca/upload/manuals/motorola-v361-manual.pdf">Motorola V361 Manual</a> proved quite helpful in this regard. Main Menu &gt; Bluetooth Link &gt; Setup &gt; Power &gt; On.</li>
<li>Next you must set your headset in Bluetooth Pairing Mode. For the Motorola H350 / H500, you make sure it&#8217;s turned off, and then press and hold the &#8220;Phone&#8221; button on the front of the device. Hold the button down (for about 10 seconds) until the blue light around the Motorola icon (also on the front of the device) remains lit, solid blue (not flashing). Now you are in &#8220;pairing&#8221; mode, which enables this to &#8220;bond&#8221; with other devices.</li>
<li>Now, on the cellphone, go to the Bluetooth configuration screen. Main Menu &gt; Bluetooth Link &gt; Handsfree &gt; Detect. This will take about 3 seconds and it will detect your earpiece. Interestingly, it detected it as an H500. Hey who knows, maybe I have an H500 instead. At any rate, now the whole kit and kaboodle works fine.</li>
</ul>
<p>So there you have it. Setting up your Motorola Bluetooth Headset for the first time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tomauger.com/blog/2007/07/31/pairing-a-bluetooth-headset-motorola-h350/feed/</wfw:commentRss>
		</item>
		<item>
		<title>One Small Step for Mankind, 2.0 Steps for tomauger.com</title>
		<link>http://www.tomauger.com/blog/2007/06/28/one-small-step-for-mankind-20-steps-for-tomaugercom/</link>
		<comments>http://www.tomauger.com/blog/2007/06/28/one-small-step-for-mankind-20-steps-for-tomaugercom/#comments</comments>
		<pubDate>Thu, 28 Jun 2007 15:26:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.tomauger.com/blog/2007/06/28/one-small-step-for-mankind-20-steps-for-tomaugercom/</guid>
		<description><![CDATA[So, kicking and screaming I&#8217;m being slowly dragged into the Web 2.0 world. The latest (after my reluctant integration into the Facebook community) is the addition of the WordPress blogging tool to my website, in preparation for an upcoming project.
Not sure yet how this is going to &#8220;change my life&#8221;. Doubt it highly. If anything, [...]]]></description>
			<content:encoded><![CDATA[<p>So, kicking and screaming I&#8217;m being slowly dragged into the Web 2.0 world. The latest (after my reluctant integration into the <a href="http://www.facebook.com/p/Tom_Auger/540386173" target="newwin">Facebook</a> community) is the addition of the <a href="http://www.wordpress.org" target="wpwin">WordPress</a> blogging tool to my website, in preparation for an upcoming project.</p>
<p>Not sure yet how this is going to &#8220;change my life&#8221;. Doubt it highly. If anything, it will just add one more stressor as there is <strong>yet</strong> one more thing that I <em>ought</em> to be doing with my time. Meh.</p>
<p>The <strong>first</strong> step is going to have to be customizing this template. Damn. More things to do and learn.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tomauger.com/blog/2007/06/28/one-small-step-for-mankind-20-steps-for-tomaugercom/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
