<?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>Matthew Miner &#187; Website Creation</title>
	<atom:link href="http://www.matthewminer.com/topics/web/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.matthewminer.com</link>
	<description>Multimedia and Technology Aficionado</description>
	<lastBuildDate>Sun, 04 Dec 2011 22:34:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Web Page Click Prevention</title>
		<link>http://www.matthewminer.com/2010/web-page-click-prevention/</link>
		<comments>http://www.matthewminer.com/2010/web-page-click-prevention/#comments</comments>
		<pubDate>Sat, 04 Sep 2010 22:56:18 +0000</pubDate>
		<dc:creator>Matthew Miner</dc:creator>
				<category><![CDATA[Website Creation]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.matthewminer.com/?p=169</guid>
		<description><![CDATA[I&#8217;ll click when I tell you to click. Or you&#8217;ll click when you tell me to click. One of those. &#8212; Pavel Maximovich Sokolov While I&#8217;m admittedly desperate for ego-boosting website clicks, I&#8217;m currently working on a project where momentarily preventing the user from following links is desirable. More specifically, there are form controls on [...]]]></description>
			<content:encoded><![CDATA[<blockquote class="quote"><p>I&#8217;ll click when I <em>tell</em> you to click. Or you&#8217;ll click when you tell me to click. One of those. <span class="author">&#8212; Pavel Maximovich Sokolov</span></p></blockquote>
<p>While I&#8217;m admittedly desperate for ego-boosting website clicks, I&#8217;m currently working on a project where momentarily preventing the user from following links is desirable.<span id="more-169"></span> More specifically, there are form controls on the page that trigger <abbr title="Asynchronous JavaScript and XML">AJAX</abbr> requests, after which a notification appears displaying the response from the server. The contents of the page change after every call; buttons that were previously disabled may become enabled, and vice versa. While this happens fairly quickly, there&#8217;s a short amount of time during which the user can click a button and trigger another call to the server before the last one has returned and modified the page accordingly.</p>
<p>One way to prevent eager users from clicking too fast is to set a JavaScript variable to false when the <abbr title="Asynchronous JavaScript and XML">AJAX</abbr> request is being made, and only allow new calls to be executed if that variable is true. The problem with doing this is that the user still sees visual confirmation of their click and expects something to happen as a result. Another solution is to disable all the buttons on the page while the request is being processed. The issue here is that the user sees a flash of disabled buttons, which isn&#8217;t exactly aesthetically pleasing.</p>
<p>Like all things worthy of a pay raise, this conundrum&#8217;s solution is a simple one. A property of <abbr title="HyperText Markup Language">HTML</abbr> divs is that they capture mouse clicks, even when transparent. By overlaying an absolutely positioned div above the form controls, they become inaccessible. The user can attempt to click them, but they will not depress and generate a server request. By default, the div&#8217;s <abbr title="Cascading Style Sheet">CSS</abbr> is set to <code>display: none</code>. When the request is made, the JavaScript switches it to <code>display: block</code>. Only if the user attempts to click a button while a request is being processed will they be aware that something is blocking them from doing so.</p>
<p>Using my old crony <a href="http://jquery.com/">jQuery</a>, the code looks something like this:</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'button'</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><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#overlay'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; $.<span style="color: #660066;">getJSON</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'/doSomething.php'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Modify page</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; ...<br />
&nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#overlay'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>And the <abbr title="HyperText Markup Language">HTML</abbr>:</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/style.html"><span style="color: #000000; font-weight: bold;">style</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span>&gt;</span><br />
&nbsp; &nbsp; #wrapper { position: relative; }<br />
<br />
&nbsp; &nbsp; #overlay {<br />
&nbsp; &nbsp; &nbsp; &nbsp; height: 100%;<br />
&nbsp; &nbsp; &nbsp; &nbsp; left: 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; position: absolute;<br />
&nbsp; &nbsp; &nbsp; &nbsp; top: 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; width: 100%;<br />
&nbsp; &nbsp; &nbsp; &nbsp; z-index: 100<br />
&nbsp; &nbsp; }<br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/style.html"><span style="color: #000000; font-weight: bold;">style</span></a>&gt;</span><br />
<br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;wrapper&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;overlay&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/button.html"><span style="color: #000000; font-weight: bold;">button</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;button&quot;</span>&gt;</span>Click Here<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/button.html"><span style="color: #000000; font-weight: bold;">button</span></a>&gt;</span><br />
&nbsp; &nbsp; ...<br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span></div></div>
<p>A simple solution to an obscure problem. Pass the A1.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.matthewminer.com/2010/web-page-click-prevention/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A New Medium for the Scrolling Marquee</title>
		<link>http://www.matthewminer.com/2010/a-new-medium-for-the-scrolling-marquee/</link>
		<comments>http://www.matthewminer.com/2010/a-new-medium-for-the-scrolling-marquee/#comments</comments>
		<pubDate>Sat, 29 May 2010 20:14:35 +0000</pubDate>
		<dc:creator>Matthew Miner</dc:creator>
				<category><![CDATA[Game Design]]></category>
		<category><![CDATA[Website Creation]]></category>
		<category><![CDATA[unity]]></category>

		<guid isPermaLink="false">http://matthewminer.com/?p=87</guid>
		<description><![CDATA[Letters in motion, you say? What a splendid invention. &#8212; Eustice P. McGargle Recently when reminiscing about that custodian of excellent web design that is was GeoCities, I decided to give the &#60;blink&#62; and &#60;marquee&#62; tags a whirl, for old time&#8217;s sake. Alas, Safari refuses to recognize these bastions of 90s tastefulness. Tears splashed on [...]]]></description>
			<content:encoded><![CDATA[<blockquote class="quote"><p>Letters in motion, you say? What a splendid invention. <span class="author">&#8212; Eustice P. McGargle</span></p></blockquote>
<p>Recently when reminiscing about that custodian of excellent web design that <del>is</del> was GeoCities, I decided to give the <code>&lt;blink&gt;</code> and <code>&lt;marquee&gt;</code> tags a whirl, for old time&#8217;s sake. Alas, Safari refuses to recognize these bastions of 90s tastefulness. Tears splashed on my keyboard as I mourned the death of greatness.<span id="more-87"></span></p>
<p>And then a user on the Unity forums asked about scrolling text in-game, to which I enthusiastically responded. Browser manufacturers may have made every attempt to kill the non-standard <abbr title="HyperText Markup Language">HTML</abbr> elements so thoughtfully introduced by Netscape and Microsoft, but they can&#8217;t take away these innovations from video games. Class will live on.</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">string</span> message <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Where we're going, we don't need roads.&quot;</span><span style="color: #008000;">;</span><br />
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">float</span> scrollSpeed <span style="color: #008000;">=</span> <span style="color: #FF0000;">50</span><span style="color: #008000;">;</span><br />
<br />
Rect messageRect<span style="color: #008000;">;</span><br />
<br />
<span style="color: #6666cc; font-weight: bold;">void</span> OnGUI <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// Set up message's rect if we haven't already</span><br />
&nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>messageRect<span style="color: #008000;">.</span><span style="color: #0000FF;">width</span> <span style="color: #008000;">==</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; GUIContent label <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> GUIContent<span style="color: #008000;">&#40;</span>message<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Vector2 dimensions <span style="color: #008000;">=</span> GUI<span style="color: #008000;">.</span><span style="color: #0000FF;">skin</span><span style="color: #008000;">.</span><span style="color: #0000FF;">label</span><span style="color: #008000;">.</span><span style="color: #0000FF;">CalcSize</span><span style="color: #008000;">&#40;</span>label<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// Start message past left side of screen</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; messageRect<span style="color: #008000;">.</span><span style="color: #0000FF;">x</span> &nbsp; &nbsp; &nbsp;<span style="color: #008000;">=</span> <span style="color: #008000;">-</span>dimensions<span style="color: #008000;">.</span><span style="color: #0000FF;">x</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; messageRect<span style="color: #008000;">.</span><span style="color: #0000FF;">width</span> &nbsp;<span style="color: #008000;">=</span> &nbsp;dimensions<span style="color: #008000;">.</span><span style="color: #0000FF;">x</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; messageRect<span style="color: #008000;">.</span><span style="color: #0000FF;">height</span> <span style="color: #008000;">=</span> &nbsp;dimensions<span style="color: #008000;">.</span><span style="color: #0000FF;">y</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
<br />
&nbsp; &nbsp; messageRect<span style="color: #008000;">.</span><span style="color: #0000FF;">x</span> <span style="color: #008000;">+=</span> Time<span style="color: #008000;">.</span><span style="color: #0000FF;">deltaTime</span> <span style="color: #008000;">*</span> scrollSpeed<span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// If message has moved past right side, move it back to left</span><br />
&nbsp; &nbsp; <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>messageRect<span style="color: #008000;">.</span><span style="color: #0000FF;">x</span> <span style="color: #008000;">&gt;</span> Screen<span style="color: #008000;">.</span><span style="color: #0000FF;">width</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; messageRect<span style="color: #008000;">.</span><span style="color: #0000FF;">x</span> <span style="color: #008000;">=</span> <span style="color: #008000;">-</span>messageRect<span style="color: #008000;">.</span><span style="color: #0000FF;">width</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
<br />
&nbsp; &nbsp; GUI<span style="color: #008000;">.</span><span style="color: #0000FF;">Label</span><span style="color: #008000;">&#40;</span>messageRect, message<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<span style="color: #008000;">&#125;</span></div></div>
<p>Stay tuned for blinking text in Unity, for even greater user enjoyment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.matthewminer.com/2010/a-new-medium-for-the-scrolling-marquee/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Down, Get Down (Unity Boogie)</title>
		<link>http://www.matthewminer.com/2008/get-down-get-down-unity-boogie/</link>
		<comments>http://www.matthewminer.com/2008/get-down-get-down-unity-boogie/#comments</comments>
		<pubDate>Mon, 05 May 2008 16:04:04 +0000</pubDate>
		<dc:creator>Matthew Miner</dc:creator>
				<category><![CDATA[Game Design]]></category>
		<category><![CDATA[Website Creation]]></category>
		<category><![CDATA[unity]]></category>

		<guid isPermaLink="false">http://matthewminer.com/wordpress2/?p=9</guid>
		<description><![CDATA[Please stop butchering our song. I&#8217;m begging you man, just quit doing it. Please. &#8212; Kool &#38; The Gang Recently I built a browser-based window system using the most excellent MooTools JavaScript framework. It behaves similar to how your modern desktop windows work. That is, windows can be opened, closed, resized, and dragged around by [...]]]></description>
			<content:encoded><![CDATA[<blockquote class="quote"><p>Please stop butchering our song. I&#8217;m begging you man, just quit doing it. Please. <span class="author">&#8212; Kool &amp; The Gang</span></p></blockquote>
<p>Recently I built a browser-based window system using the most excellent <a title="The web page of the MooTools JavaScript framework." href="http://mootools.net/">MooTools</a> JavaScript framework. It behaves similar to how your modern desktop windows work. That is, windows can be opened, closed, resized, and dragged around by their titlebar. When clicked on, a window will come to the front of the window stack. It&#8217;s a lot like the <a title="See Mocha UI in action." href="http://greghoustondesign.com/demos/mocha/">Mocha UI</a> project, just not as good (mad props to the creators of Mocha, it rocks hard).</p>
<p>Anyway, to the point of this post: in one of these windows I later embedded a Unity game. Much to my dismay I discovered that having a <code>div</code> hovering over an embedded Unity game doesn&#8217;t work &#8212; the <code>div</code> will appear <em>behind</em> it, despite having a higher <code>z-index</code>.<span id="more-9"></span> This means that I can&#8217;t have my windows properly overlapping each other, and any thought of decorating a Unity game (giving it rounded corners, perhaps) can be forgotten.</p>
<p>I&#8217;m told by intelligent people that this behaviour can be expected with <em>any</em> embedded object (<a title="Information about displaying Flash content below other layers." href="http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_15523">Flash excluded</a>). So, what&#8217;s the solution? Unfortunately there isn&#8217;t one that I&#8217;m aware of. As nice as it would be to place wacky animated GIFs overtop a well-polished Unity game (bring back 90&#8242;s web design!), you&#8217;re simply out of luck. Or I&#8217;m simply out of luck. Somebody is simply out of luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.matthewminer.com/2008/get-down-get-down-unity-boogie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wherefore Art Thou CSS?</title>
		<link>http://www.matthewminer.com/2008/wherefore-art-thou-css/</link>
		<comments>http://www.matthewminer.com/2008/wherefore-art-thou-css/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 16:02:39 +0000</pubDate>
		<dc:creator>Matthew Miner</dc:creator>
				<category><![CDATA[Website Creation]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://matthewminer.com/wordpress2/?p=7</guid>
		<description><![CDATA[Stylesheets that won&#8217;t render are more tragic than Romeo&#8217;s inability to check a pulse. &#8212; R.B. Bennett Two months ago I designed a website for the company I&#8217;m currently employed at. The site was pretty basic fare &#8212; four or five HTML pages, a few images, and a stylesheet to make it look sexy. The [...]]]></description>
			<content:encoded><![CDATA[<blockquote class="quote"><p>Stylesheets that won&#8217;t render are more tragic than Romeo&#8217;s inability to check a pulse. <span class="author">&#8212; R.B. Bennett</span></p></blockquote>
<p>Two months ago I designed a website for the company I&#8217;m currently employed at. The site was pretty basic fare &#8212; four or five <abbr title="HyperText Markup Language">HTML</abbr> pages, a few images, and a stylesheet to make it look sexy. The design was uploaded to the development server then uploaded to the live server once approved. All was well until the site was viewed in Firefox (I can&#8217;t recall how Safari and Opera behaved). For a reason unknown to all of us fine employees, the styles in the <abbr title="Cascading Style Sheet">CSS</abbr> file weren&#8217;t being applied. The .css file was most certainly <em>there</em>, and Internet Explorer displayed the site just peachy. Most perplexing was that the development server and live server are <em>supposed</em> to be identical, and no such wonkiness occurred on the dev side.<span id="more-7"></span></p>
<p>Luckily the problem was found quickly by one of my co-workers. Our live server is apparently powered by Netscape Enterprise Server, which came configured to serve .css files with the <code>application/x-pointplus</code> mime type (not good Netscape, not good at all). Some web browsers like Internet Explorer will ignore the server and treat the <abbr title="Cascading Style Sheet">CSS</abbr> file as <code>text/css</code> while others like Firefox will roll with <code>application/x-pointplus</code> and potentially show you a website that looks disastrously grotesque.</p>
<p>I&#8217;m not sure how popular Netscape Enterprise Server is, but if you happen to be using it and browsers are ignoring your stylesheets, make sure that your .css files are actually being served with the <code>text/css</code> mime type. Because that <em>just makes sense.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.matthewminer.com/2008/wherefore-art-thou-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

