<?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>RickyH</title>
	<atom:link href="http://www.rickyh.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rickyh.co.uk</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 19 Jul 2010 20:12:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>New Site &#8211; Digital Media Projects</title>
		<link>http://www.rickyh.co.uk/new-site-digital-media-projects/</link>
		<comments>http://www.rickyh.co.uk/new-site-digital-media-projects/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 20:03:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WEB]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[Jul]]></category>

		<guid isPermaLink="false">http://www.rickyh.co.uk/?p=236</guid>
		<description><![CDATA[I've worked at <a href="http://www.digitalmediaprojects.co.uk">Digital Media Projects</a> for almost two years now, and we have finally gone live with the third revision of the website. The site was designed and built by your truly and features some really cool CSS and JavaScript.
<div class="smart_Image large_smart_image">
<img alt="DMP new Site" src="/resources/2010/DMPnewSite1.jpg" />
</div>

<a class="view_demo_button" href="http://www.digitalmediaprojects.co.uk"><span class="fader" style="visibility: visible; opacity: 1;"></span><span class="buttonText" style="">Visit Site</span></a>

<a href="#" class="read_more_botton"><span class="fader"></span><span class="buttonText">Read More</span></a>    ]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve worked at <a href="http://www.digitalmediaprojects.co.uk">Digital Media Projects</a> for almost two years now, and we have finally gone live with the third revision of the website. The site was designed and built by your truly and features some really cool CSS and JavaScript.</p>
<div class="smart_Image large_smart_image">
<img alt="DMP new Site" src="/resources/2010/DMPnewSite1.jpg" />
</div>
<p><a class="view_demo_button" href="http://www.digitalmediaprojects.co.uk"><span class="fader" style="visibility: visible; opacity: 1;"></span><span class="buttonText" style="">Visit Site</span></a></p>
<h3 class="followDemo">New Mentality</h3>
<p>For a company who specializes in new media and modern technologies are website was dry, static and boring. It didn&#8217;t reflect the exciting environment we all work in and wasn&#8217;t growing at the same speed as the company. </p>
<h3 class="followDemo">Accessibility doesn&#8217;t have to be boring</h3>
<p>We wanted the new website to be accessible by anyone anywhere without losing anything in design. This includes video, animations and image heavy content.  </p>
<div class="smart_Image large_smart_image">
<img alt="DMP pure css" src="/resources/2010/DMPribbon.jpg" />
</div>
<p>Take the image above: It uses only CSS and no images, it works in every browser we tested! We also included video that will play on iPhone, iPad and any device that can handle flash. But one of my favorites is our <a href="http://www.digitalmediaprojects.co.uk/products/uhdms">3D box render</a> which also works on the iPhone and iPad.</p>
<h3 class="followDemo">Check for updates</h3>
<p>I included a <a href="http://www.digitalmediaprojects.co.uk/news">news</a> page on the site so check us out for updates on IPTV, Digital Signage and other broadcasting technologies. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.rickyh.co.uk/new-site-digital-media-projects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tab-Alerts with mootools</title>
		<link>http://www.rickyh.co.uk/tab-alert/</link>
		<comments>http://www.rickyh.co.uk/tab-alert/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 14:42:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[Apr]]></category>

		<guid isPermaLink="false">http://www.rickyh.co.uk/?p=224</guid>
		<description><![CDATA[Ever wanted to catch a users attention or provide them with important information but there away browsing Facebook or Twitter. Well Here is a simple solution with tab alerts.   

<div class="smart_Image large_smart_image">
<img alt="Space carousel" src="http://www.rickyh.co.uk/wp-content/themes/rickyhlook/images/postImages/apr2010/tabAlert.jpg" />
</div>

<a class="view_demo_button" href="http://demo.rickyh.co.uk/tab-alert/"><span class="fader" style="visibility: visible; opacity: 1;"></span><span class="buttonText" style="">View Demo</span></a>

<a href="#" class="read_more_botton"><span class="fader"></span><span class="buttonText">Read More</span></a>    ]]></description>
			<content:encoded><![CDATA[<p>Ever wanted to catch a users attention or provide them with important information but there away browsing Facebook or Twitter. Well Here is a simple solution with tab alerts.   </p>
<div class="smart_Image large_smart_image">
<img alt="Space carousel" src="http://www.rickyh.co.uk/wp-content/themes/rickyhlook/images/postImages/apr2010/tabAlert.jpg" />
</div>
<p><a class="view_demo_button" href="http://demo.rickyh.co.uk/tab-alert/"><span class="fader" style="visibility: visible; opacity: 1;"></span><span class="buttonText" style="">View Demo</span></a></p>
<h3 class="followDemo">Eh! what does it do again?</h3>
<p>Well quite simply it updates the web-pages title attribute when a user is inactive or browsing in another tab. When the user returns the title returns to the original state.</p>
<h3 class="followDemo">Basic Usage</h3>
<p>This demo changes the title to show the user they have a new message in their inbox.</p>
<pre class="code code_html" style="width: 600px;">
     var myVar = new tabAlert({
          text: 'You have one new message.'
     });
</pre>
<h3 class="followDemo">More Advanced Usage</h3>
<p>This demo shows a goal alert.</p>
<pre class="code code_html" style="width: 600px;">
     var myVar = new tabAlert({
          text: 'GOAL FLASH: Manchester United 0:1 LEEDS UNITED (Beckford 19',
          ticker: true,
          speed: 200,
          onLoop: function(){
             checkForMoreGoals();
          }
     });
</pre>
<h3 class="followDemo">My first Mootools plugin</h3>
<p>This is my first MooTools plugin. I don&#8217;t usually get to time to write one (The process of submitting your first takes forever)! But it&#8217;s up and you can download it <a href="http://mootools.net/forge/p/tab_alert">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rickyh.co.uk/tab-alert/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS3 Pullout Menu</title>
		<link>http://www.rickyh.co.uk/css3-pullout-menu/</link>
		<comments>http://www.rickyh.co.uk/css3-pullout-menu/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 23:16:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[Mar]]></category>

		<guid isPermaLink="false">http://www.rickyh.co.uk/?p=198</guid>
		<description><![CDATA[This demo is for a folding pull-out menu that uses CSS3, HTML Elements and JavaScript only. It uses no images or flash to produce the effect although they could be used to enhance the natural feel.
<div class="smart_Image large_smart_image">
<img alt="Space carousel" src="http://www.rickyh.co.uk/wp-content/themes/rickyhlook/images/postImages/mar2010/css3PullOutMenu.jpg" />
</div>

<a class="view_demo_button" href="http://demo.rickyh.co.uk/css3-pullout-menu/"><span class="fader" style="visibility: visible; opacity: 1;"></span><span class="buttonText" style="">View Demo</span></a>

<a href="#" class="read_more_botton"><span class="fader"></span><span class="buttonText">Read More</span></a>    ]]></description>
			<content:encoded><![CDATA[<p>This demo is for a folding pull-out menu that uses CSS3 elements and JavaScript only. It uses no images or flash to produce the effect although they could be used to enhance the natural feel.</p>
<div class="smart_Image large_smart_image">
<img alt="Space carousel" src="http://www.rickyh.co.uk/wp-content/themes/rickyhlook/images/postImages/mar2010/css3PullOutMenu.jpg" />
</div>
<p><a class="view_demo_button" href="http://demo.rickyh.co.uk/css3-pullout-menu/"><span class="fader" style="visibility: visible; opacity: 1;"></span><span class="buttonText" style="">View Demo</span></a></p>
<h3 class="followDemo">The Idea</h3>
<p>I&#8217;ve seen this effect used before but most recently in a tech demo for Microsoft&#8217;s &#8220;Courier&#8221;. Below is a snippet of how this menu system works:<br />
<img style='margin: 10px auto;' alt="Pullout Menu Design" src="http://www.rickyh.co.uk/resources/2010/pullout.gif" /><br />
My Idea was to build this using DHTML only. No Flash, Canvas or SVG but pure HTML, CSS and JavaScript.</p>
<h3 class="followDemo">The Basis</h3>
<p>The Pullout menu comprises of five HTML elements a,b,c,d and a handle. Elements a,b,c,d are positioned and then skewed to give the effect of a folding object.<br />
<img style="margin: 10px 0px 10px 23px;" src="http://www.rickyh.co.uk/resources/2010/perp.jpg" alt="folding object" /><br />
When the handle is pulled outwards the width of the elements is stretched and the skew becomes less. This and some colouring effects in JavaScript give the effect of a fold.</p>
<h3 class="followDemo">Final Effects</h3>
<p>I added a simple &#8220;on complete&#8221; event that detects when the menu is fully opened. The event can be used to trigger any JavaScript you like. I also tinkered with a revert animation that was triggered if the menu was released without being fully open, although this was cool it made it impossible to view the code frame-by-frame in firebug.</p>
<h3 class="followDemo">Folding Improvements</h3>
<p>The animation I used doesn&#8217;t seem natural to me, this was down to my lack of understanding in perspective drawings and transitions. Im sure someone with a better understanding could make a much better example from this concept. Maybe if images, gradients and shadows were introduced the effect would start to feel more natural.</p>
<h3 class="followDemo">Finally</h3>
<p>If anyone does improve the menu could you let me know. I&#8217;d be really interested to see it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rickyh.co.uk/css3-pullout-menu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flipping Crazy &#8211; CSS3</title>
		<link>http://www.rickyh.co.uk/flipping-crazy-css3/</link>
		<comments>http://www.rickyh.co.uk/flipping-crazy-css3/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 16:32:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[Mar]]></category>

		<guid isPermaLink="false">http://www.rickyh.co.uk/?p=181</guid>
		<description><![CDATA[This is a pseudo way to flip HTML elements on their backs. This is a way of doing it now without waiting for a possible introduction of <a href="http://webkit.org/blog/386/3d-transforms/" target="_blank">3D Transforms</a> from webkit. Try the demo or read the post to found out how it was done:
<div class="smart_Image large_smart_image">
<img alt="Space carousel" src="http://www.rickyh.co.uk/wp-content/themes/rickyhlook/images/postImages/feb2010/flippingcrazycss.jpg" />
</div>

<a class="view_demo_button" href="http://demo.rickyh.co.uk/flipping-crazy-css3/"><span class="fader" style="visibility: visible; opacity: 1;"></span><span class="buttonText" style="">View Demo</span></a>

<a href="#" class="read_more_botton"><span class="fader"></span><span class="buttonText">Read More</span></a>    ]]></description>
			<content:encoded><![CDATA[<p>This is a pseudo way to flip HTML elements on their backs. This is a way of doing it now without waiting for a possible introduction of <a href="http://webkit.org/blog/386/3d-transforms/" target="_blank">3D Transforms</a> from webkit.</p>
<div class="smart_Image large_smart_image">
<img alt="Space carousel" src="http://www.rickyh.co.uk/wp-content/themes/rickyhlook/images/postImages/feb2010/flippingcrazycss.jpg" />
</div>
<p><a class="view_demo_button" href="http://demo.rickyh.co.uk/flipping-crazy-css3/"><span class="fader" style="visibility: visible; opacity: 1;"></span><span class="buttonText" style="">View Demo</span></a></p>
<h3 class="followDemo">About Flipping</h3>
<p>I first used flipping a few years ago when building touch screen HTML applications for kiosks. The animation would basically make the elements width 0 whilst moving the elements position right. This would give the effect that the element had been &#8220;sort of&#8221; flipped. It was a very simple solution and would only work if the animation was fast. Tricking the human eye into thinking it was actually flipped. </p>
<h3 class="followDemo">So what&#8217;s changed</h3>
<p>Well firstly CSS3 allows you to skew, not screw! but skew. Skew allows you to give a simple pseudo 3D effect. It&#8217;s not ideal for this example but until 3D Transforms come in, it greatly adds to the effect of tricking the eye into thinking the element has been flipped.    </p>
<h3 class="followDemo">The Process</h3>
<p>The animation works in three steps:</p>
<p>The first step goes from: [width: curWidth, left: 0, skew: 0deg 0deg] to: [width: 0, left: initialWidth/2, skew: 0deg 20deg]. This gives the effect that the element has been flipped like a playing card onto its thinnest edge, essentially you cannot see it at this stage.</p>
<p>The second step triggers any javaScript you want to happen. In my examples I add a class to the element called &#8220;toggleTrue&#8221; which can be used to change the CSS properties of the box. Potentially videos, images or text could be inserted creating a sort of flipping lightbox.</p>
<p>The third and final step animates the element from it&#8217;s side to it&#8217;s back-facing plane. The animation goes from: [width: 0, left: initialWidth/2, skew: 0deg -20deg] to: [width: initialWidth, left: 0, skew: 0deg 0deg]. Notice the skew changes from step one&#8217;s finishing position to a negative value, without doing this it looks as if the card has gone 90deg and back again.</p>
<h3 class="followDemo">Flipping an element with background-image set:</h3>
<p>When I initially did this a few years ago I would use an image tag and just flip that. This was because changing the width of an image stretches the image and using background-image wouldn&#8217;t do that, until now that is. By using the CSS3 property &#8220;background-size&#8221; I can set the width to 100%, this makes the background-image stretch as the container does. </p>
<h3 class="followDemo">Why not use CSS3 animation in webkit?</h3>
<p>I did experiment with CSS3 animations and failed quite quickly. The problem i found was the absence of a javaScript callback method. There might be one but I couldn&#8217;t work out how and without a callback, CSS animations seem quite useless to me. </p>
<p>I also tried using CSS3 3D transforms. This looks much better than skew because the element is actually flipped &#8211; No moving the elements position, no tricks of the eye, no fakery! The problem was that JavaScript manipulation of these CSS3 3D transforms seemed to create some crazy artefacts in the picture. </p>
<h3 class="followDemo">Finally</h3>
<p>Take a look at the code in firebug and see how it works. If you know how to use firebug&#8217;s console try setting the effects speed using &#8220;effectSpeed = 1000;&#8221;. This slows the animation down. Please leave your comments and thoughts below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rickyh.co.uk/flipping-crazy-css3/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Fun with CSS3 and mootools</title>
		<link>http://www.rickyh.co.uk/fun-with-css3-and-mootools/</link>
		<comments>http://www.rickyh.co.uk/fun-with-css3-and-mootools/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 13:44:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[Jan]]></category>

		<guid isPermaLink="false">http://www.rickyh.co.uk/?p=166</guid>
		<description><![CDATA[These examples came about when experimenting with the extend property in MooTools. By extending the styles class I could add CSS3 properties into the Core MooTools framework and do CSS3 animations. 
<div class="smart_Image large_smart_image">
<img alt="Space carousel" src="http://www.rickyh.co.uk/wp-content/themes/rickyhlook/images/postImages/jan2010/funWithcss3andMootools.jpg" />
</div>
<a class="view_demo_button" href="http://demo.rickyh.co.uk/fun-with-CSS3-and-mootools/"><span class="fader" style="visibility: visible; opacity: 1;"></span><span class="buttonText" style="">View Demo</span></a>

<a href="#" class="read_more_botton"><span class="fader"></span><span class="buttonText">Read More</span></a>    ]]></description>
			<content:encoded><![CDATA[<p>These examples came about when experimenting with the extend property in MooTools. By extending the styles class I could add CSS3 properties into the Core MooTools framework and do CSS3 animations.</p>
<div class="smart_Image large_smart_image"><img src="http://www.rickyh.co.uk/wp-content/themes/rickyhlook/images/postImages/jan2010/funWithcss3andMootools.jpg" alt="Space carousel" /></div>
<p><a class="view_demo_button" href="http://demo.rickyh.co.uk/fun-with-CSS3-and-mootools/"><span class="fader" style="visibility: visible; opacity: 1;"></span><span class="buttonText" style="">View Demo</span></a></p>
<h3 class="followDemo">The Extend Code</h3>
<p>Bellow is the Mozilla code to extend MooTools with the Border-Radius and Box-Shadow:</p>
<pre class="code code_html">var newStyles = new Hash({
     'MozBorderRadius': '@px @px @px @px',
     'MozBoxShadow': '@px @px @px rgb(@, @, @)'
});

$extend(Element.Styles, newStyles);</pre>
<p>The WebKit code is slightly different. For some reason i couldn&#8217;t get the webkitBorderRadius to work without doing each corner individually. For more info on the differences read <a href="http://www.css3.info/border-radius-apple-vs-mozilla/" target="_blank">this</a></p>
<pre class="code code_html">var newStyles = new Hash({
     'webkitBorderBottomLeftRadius': '@px @px',
     'webkitBorderBottomRightRadius': '@px @px',
     'webkitBorderTopLeftRadius': '@px @px',
     'webkitBorderTopRightRadius': '@px @px',
     'webkitBoxShadow': 'rgb(@, @, @) @px @px @px'
});

$extend(Element.Styles, newStyles);</pre>
<h3 class="followDemo">The CSS3 Animation</h3>
<p>For the animations we can now simply use the same MooTools FX and we would use with CSS2. Below is an example for FireFox:</p>
<pre class="code code_html">
     $("h31").set('morph', {
          duration: 300,
          transition: 'Sine:out'
     });

     $("h31").addEvents({
          'mouseover': function(){
	       this.morph({
                    'MozBorderRadius': '8px 8px 30px 30px'
               });
	   },
          'mouseout': function(){
               this.morph({
                    'MozBorderRadius': '30px 30px 8px 8px'
               });
	   }
       });
</pre>
<p>And that&#8217;s it really. Very simple to set up and the animations are smooth and stylish. The example will work on any WebKit browser including Chrome and Safari and Mozilla browsers including FireFox. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.rickyh.co.uk/fun-with-css3-and-mootools/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>New Site &#8211; PH Engineering Limited</title>
		<link>http://www.rickyh.co.uk/pheltd/</link>
		<comments>http://www.rickyh.co.uk/pheltd/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 09:23:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WEB]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[Jan]]></category>

		<guid isPermaLink="false">http://www.rickyh.co.uk/?p=156</guid>
		<description><![CDATA[A new website design for PH Engineering Limited. The site is a simple clean design incorporating some clever JavaScript and stylish CSS. This was the companies first website and I was pleased to get offered Creative Control on this project. 
<div class="smart_Image large_smart_image">
<img alt="Space carousel" src="http://www.rickyh.co.uk/wp-content/themes/rickyhlook/images/postImages/jan2010/pheltd.jpg" />
</div>


<a class="view_demo_button" href="http://pheltd.com"><span class="fader" style="visibility: visible; opacity: 1;"></span><span class="buttonText" style="">Visit Site</span></a>

<a href="#" class="read_more_botton"><span class="fader"></span><span class="buttonText">Read More</span></a>    ]]></description>
			<content:encoded><![CDATA[<p>A new website design for PH Engineering Limited. The site is a simple clean design incorporating some clever JavaScript and stylish CSS. This was the companies first website and I was pleased to get offered Creative Control on this project. </p>
<div class="smart_Image large_smart_image">
<img alt="Space carousel" src="http://www.rickyh.co.uk/wp-content/themes/rickyhlook/images/postImages/jan2010/pheltd.jpg" />
</div>
<p><a class="view_demo_button" href="http://pheltd.com"><span class="fader" style="visibility: visible; opacity: 1;"></span><span class="buttonText" style="">View Site</span></a></p>
<h3 class="followDemo">Design</h3>
<p>The only thing I was given before this project was a logo: its rare to get such freedom when designing a website but in this case I had a blank canvas. After only one design proof the client was happy enough to let me get stuck in with the code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rickyh.co.uk/pheltd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rotate360 (Image rotation in javascript)</title>
		<link>http://www.rickyh.co.uk/rotate360/</link>
		<comments>http://www.rickyh.co.uk/rotate360/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 22:51:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[2009]]></category>
		<category><![CDATA[Dec]]></category>

		<guid isPermaLink="false">http://www.rickyh.co.uk/?p=146</guid>
		<description><![CDATA[This is an example of image rotation and control using CSS sprites and JavaScript. The example i went for is based on a product demo by apple for the <a target="_blank" href="http://www.apple.com/uk/ipodtouch/gallery/">Ipod touch</a>. There example uses Quicktime but i thought is was possible in JavaScript so i gave it a go.  
<div class="smart_Image large_smart_image">
<img alt="Space carousel" src="http://www.rickyh.co.uk/wp-content/themes/rickyhlook/images/postImages/dec2009/rotate360.jpg" />
</div>

<a class="view_demo_button" href="http://demo.rickyh.co.uk/rotate360/"><span class="fader" style="visibility: visible; opacity: 1;"></span><span class="buttonText" style="">View Demo</span></a>

<a href="#" class="read_more_botton"><span class="fader"></span><span class="buttonText">Read More</span></a>    ]]></description>
			<content:encoded><![CDATA[<p>This is an example of image rotation and control using CSS sprites and JavaScript. The example i went for is based on a product demo by apple for the <a target="_blank" href="http://www.apple.com/uk/ipodtouch/gallery/">Ipod touch</a>. There example uses Quicktime but i thought is was possible in JavaScript so i gave it a go.  </p>
<div class="smart_Image large_smart_image">
<img alt="Space carousel" src="http://www.rickyh.co.uk/wp-content/themes/rickyhlook/images/postImages/dec2009/rotate360.jpg" />
</div>
<p><a class="view_demo_button" href="http://demo.rickyh.co.uk/rotate360/"><span class="fader" style="visibility: visible; opacity: 1;"></span><span class="buttonText" style="">View Demo</span></a></p>
<h3 class="followDemo">Step 1</h3>
<p>First i download the QuickTime file opened it and exported it as JPEG images at 1 image per second. I think this produced about 72 images at 40k each.</p>
<h3 class="followDemo">Step 2 &#8211; FAIL!</h3>
<p>In my first attempt i tried to show all 72 images positioned on-top of one another. When i needed a specific image I would just change the z-index. The method stank and the results were terribly slow.</p>
<h3 class="followDemo">Step 3 &#8211; RSI!</h3>
<p>My next idea was to use it as a CSS sprite. I had no idea this would work but set out adding all 72 images into one very large file. I even thought of writing an app just to do this for me as it may have taken less time. Once done the image dimensions were 880px by 33840px &#8211; The problem with this is I couldn&#8217;t save it as JPEG/png/gif only TIFF which isnt natively supported in browsers. So&#8230; I did some research and found out the height must be less than 30000px to be a JPEG. Once resized and saved i was ready to code. </p>
<h3 class="followDemo">Step 4 &#8211; code!</h3>
<p>The coding was simple really: i just change the background position on mouse-move and the animation is done. Take alook at the code on the demo, it&#8217;s really easy. I added a few options just in case your using a slow browser or your CPU is slow.</p>
<h3 class="followDemo">Step 5 &#8211; Future work</h3>
<p>I really like the effect and might see if speed improvements can be made in canvas. I might also invest in a tri-pod and lightbox and take some stop-motion pictures of my own. I have done a few websites where this would have been great. Any further suggestions please leave them below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rickyh.co.uk/rotate360/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Spacegallery &#8211; mooStyle</title>
		<link>http://www.rickyh.co.uk/spacegallery-moostyle/</link>
		<comments>http://www.rickyh.co.uk/spacegallery-moostyle/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 16:05:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[2009]]></category>
		<category><![CDATA[Nov]]></category>

		<guid isPermaLink="false">http://www.rickyh.co.uk/?p=123</guid>
		<description><![CDATA[I was combing the JavaScript framework blogs and came across this image carousel in JQuery: <a href="http://eyecon.ro/spacegallery/" target="_blank">SpaceGallery</a>. I used this same concept in my old website but it was written in mootools. The jQuery plug-in feels unresponsive and slow and doesn't have any features. So here is the mootools version i wrote, sorry is not as a plugin but feel free to make it into one.
<div class="smart_Image large_smart_image">
<img alt="Space carousel" src="http://www.rickyh.co.uk/wp-content/themes/rickyhlook/images/postImages/nov2009/spaceGallery.jpg" />
</div>

<a class="view_demo_button" href="http://demo.rickyh.co.uk/spacegallery-moostyle/"><span class="fader" style="visibility: visible; opacity: 1;"></span><span class="buttonText" style="">View Demo</span></a>

<a href="#" class="read_more_botton"><span class="fader"></span><span class="buttonText">Read More</span></a>    ]]></description>
			<content:encoded><![CDATA[<p>I was combing the JavaScript framework blogs and came across this image carousel in JQuery: <a href="http://eyecon.ro/spacegallery/" target="_blank">SpaceGallery</a>. I used this same concept in my old website but it was written in mootools. The jQuery plug-in feels unresponsive and slow and doesn&#8217;t have any features. So here is the mootools version I wrote, sorry it is not as a plugin but feel free to make it into one.</p>
<div class="smart_Image large_smart_image"><img src="http://www.rickyh.co.uk/wp-content/themes/rickyhlook/images/postImages/nov2009/spaceGallery.jpg" alt="Space carousel" /></div>
<p><a class="view_demo_button" href="http://demo.rickyh.co.uk/spacegallery-moostyle/"><span class="fader"> </span><span class="buttonText">View Demo</span></a></p>
<h3 class="followDemo">Things you need</h3>
<p>First get <a href="http://ajax.googleapis.com/ajax/libs/mootools/1.2.4/mootools-yui-compressed.js" target="_blank">Mootools (This demo uses 1.2.4)</a> and if you want the color plugin I use in the demo you can download this from <a href="http://mootools.net/more" target="_blank">mootools more</a>.</p>
<h3 class="followDemo">The JavaScript</h3>
<p>Sorry about the mess of this: I haven&#8217;t written it to be dynamic as it was rushed out late at night. The positioning of elements is hard-coded but would be simple to adapt if i could be bothered to comment anything. So here it is:</p>
<pre class="code code_html" style="width: 600px;">var spacers = "";

function loadDemo(){
     spacers = $("spaceMan").getElements(".spaceOB");
     intSpace();
}

function intSpace(){
     spacers.addEvents({
          'mouseover': function(){
               if(this.getStyle("z-index") != 20){
                    this.setStyle("top", parseInt(this.getStyle("top"))-2);
               }
          },
          'mouseout': function(){
                if(this.getStyle("z-index") != 20){
                     this.setStyle("top", parseInt(this.getStyle("top"))+2);
                }
          },
          'click': function(){
               doSpace(this);
          }
     });

     spacers.each(function(item, index){
          var color = [index*40, 82, 87].hsbToRgb();
          spacers[index].setStyles({
               "z-index": 20-index,
               "background-color": color
          });
          spacers[index].set(
               'morph',
               {
                    duration: 1000-(index*100),
                    transition: 'Sine:out'
               }
          );

          spacers[index].morph(
          {
                opacity: [0, (100-(index*10))/100],
                width: 323-(index*32.3),
                height: 203-(index*20.3),
                left: 60+((index*23.5)/1.5),
                top: 80-(index*(15-(index)))
          });
     });
     setTimeout(function(){$("spaceHelp").fade([0,1]);}, 1000);
}

function doSpace(el){
     $("spaceHelp").fade(0);
     var positionOfClicked = 20 - el.getStyle("z-index");
     var topPos = 0;
     spacers.each(function(item, index){
          var zIndexi = parseInt(spacers[index].getStyle("z-index"));
          if(zIndexi == 20){
               spacers[index].setStyle("z-index", 20-(spacers.length-1));
               spacers[index].set('morph', {
                    duration: '500',
                    transition: 'Sine:out',
                    onComplete: function(){
                         spacers[index].set(
                              'morph',
                              {
                                   duration: '500',
                                   transition: 'Sine:out'
                              }
                         );
                         spacers[index].morph({
                              opacity: [0, 0.5],
                              width: [94,161.5],
                              height: [50, 62.5],
                              left: [170, 138],
                              top: [40, 30]
                         });
               }});
               spacers[index].morph({
                    opacity: 0,
                    width: 400,
                    height: 220,
                    left: 25,
                    top: 110
               });
          }
          else{
               var thisPos = 20-(zIndexi+1);
               spacers[index].setStyle("z-index", zIndexi+1);
               spacers[index].set(
                    'morph',
                    {
                         duration: '500',
                         transition: 'Sine:out'
                    });
                spacers[index].morph({
                     opacity: (100-(thisPos*10))/100,
                     width: 323-(thisPos*32.3),
                     height: 203-(thisPos*20.3),
                     left: 60+((thisPos*23.5)/1.5),
                     top: 80-(thisPos*(15-(thisPos)))
                });
          }
     });
     if(positionOfClicked == 0){
          return false;
     }
     if(positionOfClicked != 1){
          setTimeout(function(){doSpace(el)}, 125);
     }
}</pre>
<h3 class="followDemo">The CSS and HTML</h3>
<p>The css:</p>
<pre class="code code_html"> #spaceManHolder{
   	width: 450px;
 	height: 500px;
 	margin: 40px auto 0px auto;
 	position: relative;
 }
 #spaceMan{
  	width: 450px;
 	height: 300px;
  	position: relative;
 }

 #spaceHelp{
 	font-size: 10px;
 	color: #fff;
 	text-align: center;
 	opacity: 0;
 }

.spaceOB{
	position: absolute;
	width: 100px;
	height: 100px;
	z-index: 100;
}</pre>
<p>and the html:</p>
<pre class="code code_html">&lt;div id="spaceManHolder"&gt;
     &lt;div id="spaceMan"&gt;
          &lt;div class="spaceOB"&gt;&lt;/div&gt;
          &lt;div class="spaceOB"&gt;&lt;/div&gt;
          &lt;div class="spaceOB"&gt;&lt;/div&gt;
          &lt;div class="spaceOB"&gt;&lt;/div&gt;
          &lt;div class="spaceOB"&gt;&lt;/div&gt;
          &lt;div class="spaceOB"&gt;&lt;/div&gt;
     &lt;/div&gt;
     &lt;div id="spaceHelp"&gt;
          Click The front block or try selecting
          a block from the back
     &lt;/div&gt;
&lt;/div&gt;</pre>
<p>If you would like to use or add to this example please do:)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rickyh.co.uk/spacegallery-moostyle/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>CSS: Position-x and Position-y</title>
		<link>http://www.rickyh.co.uk/css-position-x-and-position-y/</link>
		<comments>http://www.rickyh.co.uk/css-position-x-and-position-y/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 16:30:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[2009]]></category>
		<category><![CDATA[Nov]]></category>

		<guid isPermaLink="false">http://www.rickyh.co.uk/?p=100</guid>
		<description><![CDATA[ While building out a content management system for <a href="http://www.dmpip.tv" target="_blank">DMP</a> I needed to create a toolbar which would stay with position: fixed; on the y-axis, but act like position: absolute on the x-axis. To achieve this I used a clever JavaScript class from <a href="http://davidwalsh.name" target="_blank">David Walsh</a> called <a target="_blank" href="http://davidwalsh.name/scrollspy">scrollspy</a>. View the example below to see it in action.
<div class="smart_Image large_smart_image">
<img alt="Position-x: Position-y:" src="http://www.rickyh.co.uk/wp-content/themes/rickyhlook/images/postImages/nov2009/posXposY.jpg" />
</div>

<a class="view_demo_button" href="http://demo.rickyh.co.uk/css-position-x-and-position-y/"><span class="fader" style="visibility: visible; opacity: 1;"></span><span class="buttonText" style="">View Demo</span></a>

<a href="#" class="read_more_botton"><span class="fader"></span><span class="buttonText">Read More</span></a>    ]]></description>
			<content:encoded><![CDATA[<p>While building out a content management system for <a href="http://www.dmpip.tv" target="_blank">DMP</a> I needed to create a toolbar which would stay with position: fixed; on the y-axis, but act like position: absolute on the x-axis. To achieve this I used a clever JavaScript class from <a href="http://davidwalsh.name" target="_blank">David Walsh</a> called <a href="http://davidwalsh.name/scrollspy" target="_blank">scrollspy</a>.</p>
<div class="smart_Image large_smart_image"><img src="http://www.rickyh.co.uk/wp-content/themes/rickyhlook/images/postImages/nov2009/posXposY.jpg" alt="Position-x: Position-y:" /></div>
<p><a class="view_demo_button" href="http://demo.rickyh.co.uk/css-position-x-and-position-y/"><span class="fader"> </span><span class="buttonText">View Demo</span></a></p>
<h3 class="followDemo">The JavaScript</h3>
<p>Things you will need first: <a href="http://ajax.googleapis.com/ajax/libs/mootools/1.2.4/mootools-yui-compressed.js" target="_blank">Mootools (This demo uses 1.2.4)</a> and the <a href="http://davidwalsh.name/js/scrollspy" target="_blank">ScrollSpy</a> plugin from David Walsh. Next write this for you element:</p>
<pre class="code code_html">var ss = new ScrollSpy({
     mode: 'horizontal',
     onTick: function(position,state,enters,leaves) {
          $("sidePanel").style.left = -position.x+"px";
     },
     container: window
});</pre>
<h3 class="followDemo">The CSS</h3>
<p>In the CSS use position: fixed; because we have handled the position-x: absolute; in JavaScript. so:</p>
<pre class="code code_html">
#sidePanel {
     position:fixed;
     left:0;
     top:0;
     width:250px;
     z-index:1000;
}
</pre>
<p>The above example will keep our sidePanel element from disappearing when you scroll down the page but it will scroll with the page when the user scrolls right.</p>
<p>To do the opposite ie. position-x: fixed; position-y: absolute; In the JavaScript change mode: &#8216;horizontal&#8217; to mode: &#8216;vertical&#8217; and -position.x+&#8221;px&#8221;; to -position.y+&#8221;px&#8221;; and that&#8217;s it any comments, ideas or improvements leave them below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rickyh.co.uk/css-position-x-and-position-y/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>RickyH &#8211; Halloween Logo</title>
		<link>http://www.rickyh.co.uk/halloween-logo/</link>
		<comments>http://www.rickyh.co.uk/halloween-logo/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 12:33:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[2009]]></category>
		<category><![CDATA[Oct]]></category>

		<guid isPermaLink="false">http://www.rickyh.co.uk/?p=23</guid>
		<description><![CDATA[So its Halloween again and to celebrate I decided to create a new logo. I have to begin by apologizing to people using <a target="_blank" href="http://www.iesucks.info/">Internet Explorer</a> because the Logo simply won't work; this is partially to do with me being too lazy to <a href="http://code.google.com/p/explorercanvas/" target="_blank">port it over</a> and partly because <a target="_blank" href="http://www.iesucks.info/">IE</a> stinks and doesn't support the <a target="_blank" href="https://developer.mozilla.org/en/Canvas_tutorial">CANVAS</a> element.

<div class="smart_Image large_smart_image">
<img alt="New Design Of RickyH.co.uk" src="http://www.rickyh.co.uk/wp-content/themes/rickyhlook/images/postImages/oct2009/HalloweenLogo.jpg" />
</div>

<a href="#" class="read_more_botton"><span class="fader"></span><span class="buttonText">Read More</span></a>    ]]></description>
			<content:encoded><![CDATA[<p>So its Halloween again and to celebrate I decided to create a new logo. I have to begin by apologizing to people using <a href="http://www.iesucks.info/" target="_blank">Internet Explorer</a> because the Logo simply won&#8217;t work; this is partially to do with me being too lazy to <a href="http://code.google.com/p/explorercanvas/" target="_blank">port it over</a> and partly because <a href="http://www.iesucks.info/" target="_blank">IE</a> stinks and doesn&#8217;t support the <a href="https://developer.mozilla.org/en/Canvas_tutorial" target="_blank">CANVAS</a> element.</p>
<p>The following steps show how i made my Halloween Logo:</p>
<h3>Step 1: Turn your logo into a mask</h3>
<div class="smart_Image large_smart_image"><img src="http://www.rickyh.co.uk/wp-content/themes/rickyhlook/images/postImages/oct2009/HalloweenLogoMask.jpg" alt="New Design Of RickyH.co.uk" /></div>
<p>To change a logo into a mask simply select the outline of your logo shape. <span class="tip">Photoshop: (cmd/ctrl click layer);</span> and remove the selection from a solid square of slightly bigger size. Set the mask-image&#8217;s background-color to the background-color of your website <span class="tip">(In my case my #141414)</span>. Now save the image with a transparent background as .png (or .gif if you care about IE6). <a href="http://www.rickyh.co.uk/wp-content/themes/rickyhlook/images/logoIn.png" target="_blank">View my image</a></p>
<h3>Step 2: The HTML</h3>
<pre class="code code_html">&lt;div id="headerimg"&gt;
     &lt;canvas id="bloodyMess" /&gt;
     &lt;a href="http://www.rickyh.co.uk/"/&gt;
&lt;/div&gt;</pre>
<p>So we have three elements: The holder div, the canvas element and an anchor element.</p>
<h3>Step 3: The CSS</h3>
<pre class="code code_css">#headerimg {
     position:absolute;
     background-color:#141414;
     width:157px;
     height:188px;
     left:45px;
     top:30px;
}

#bloodyMess {
     position:absolute;
     background-color:#141414;
     width:157px;
     height:188px;
     z-index:1;
     left: 0;
     top: 0;
}

#headerimg a {
     position:absolute;
     background-image:url(images/logoIn.png);
     display:block;
     width:157px;
     height:188px;
     left:0;
     top:0;
     z-index:1001;
}</pre>
<p>As you can see from the css, all the elements are positioned absolute. This is to take advantage of using z-index to position the anchor element above the canvas element. The anchor element uses the image-mask we created earlier as the background-image.</p>
<h3>Step 3: The JavaScript</h3>
<p>This example uses a stripped down version of <a href="http://www.chiptune.com/" target="_blank">Christophe Résigné</a> amazing <a href="http://www.chiptune.com/starfield/starfield.html" target="_blank">Starfield</a> experiment. I also use <a href="http://mootools.net/" target="_blank">Mootools</a> version <a href="http://ajax.googleapis.com/ajax/libs/mootools/1.2.4/mootools-yui-compressed.js" target="_blank">1.2.4</a>.</p>
<pre class="code code_js" style="width: 600px;">var blood_x_save,blood_y_save;
var drip_speed= 0.01;
var blood_drops = 500;
var star=new Array(blood_drops);
var context;
var bloodtimeout = 0;
var bloodfps= 25;

var Page = {
     initialize: function(){
     initBlood();
     doLogo();
     }
}

window.addEvent("domready", Page.initialize);

function doLogo(){
     $("headerimg").getElement("a").addEvents({
          'mouseover': function(){
               $("bloodyMess").fade(1);
               animBlood();
          },
          'mouseout': function(){
               $("bloodyMess").fade(0);
               clearTimeout(bloodtimeout);
          }
     });
} 

function initBlood()
{
     $("bloodyMess").setStyle("opacity", "0");
     var a=0;
     for(var i=0;i&lt;blood_drops;i++)
     {
          star[i]=new Array(5);
          star[i][0]=Math.random()*157*2-78*2;
          star[i][1]=Math.random()*188*2-89*2;
          star[i][2]=Math.round(Math.random()*172.5);
          star[i][3]=0;
          star[i][4]=0;
     }
     var bloodyMess=$('bloodyMess');
     context=bloodyMess.getContext('2d');
     bloodyMess.width = 157;
     bloodyMess.height = 188;
     context.fillStyle='rgb(149,4,4)';
     context.strokeStyle='rgb(0,0,0)';
}

function animBlood()
{
     context.fillRect(0,0,157,188);
     for(var i=0;i&lt;blood_drops;i++)
     {
          test=true;
          blood_x_save=star[i][3];
          blood_y_save=star[i][4];
          star[i][0]+=11&gt;&gt;4;
          if(star[i][0]&gt;78&lt;&lt;1){
               star[i][0]-=157&lt;&lt;1;
               test=false;
          }
          if(star[i][0]&lt;-78&lt;&lt;1){
               star[i][0]+=157&lt;&lt;1;
               test=false;
          }
          star[i][1]+=31&gt;&gt;4;
          if(star[i][1]&gt;89&lt;&lt;1) {
               star[i][1]-=188&lt;&lt;1;
               test=false;
          }
          if(star[i][1]&lt;-89&lt;&lt;1) {
               star[i][1]+=188&lt;&lt;1;
               test=false;
          }
          star[i][2]-=drip_speed;
          if(star[i][2]&gt;172.5) {
               star[i][2]-=172.5;
               test=false;
          }
          if(star[i][2]&lt;0) {
               star[i][2]+=172.5;
               test=false;
          }
          star[i][3]=78+(star[i][0]/star[i][2])*300;
          star[i][4]=89+(star[i][1]/star[i][2])*300;
if(blood_x_save&gt;0&amp;&amp;blood_x_save&lt;157&amp;&amp;blood_y_save&gt;0&amp;&amp;blood_y_save&lt;188&amp;&amp;test)
          {
               context.fillStyle='rgba(149, 4, 4, 0.5)';
               context.lineWidth=(1-0.005*star[i][2])*5;
               context.beginPath();
               context.moveTo(blood_x_save,blood_y_save);
               context.lineTo(star[i][3],star[i][4]);
               context.stroke();
               context.closePath();
          }
     }
     bloodtimeout=setTimeout('animBlood()',bloodfps);
}</pre>
<p>This is the most complicated part. First I fire two functions: initBlood() and doLogo() using <a href="http://mootools.net/docs/core/Utilities/DomReady" target="_blank">Mootools domready</a> event.</p>
<p>initBlood() initializes the CANVAS element and the array to handle the blood. It also sets the  CANVAS elements opacity to 0 because I didn&#8217;t want to view the blood until you hover over it.</p>
<p>doLogo() handles the hover of the anchor element. On mouseover I fade-in the CANVAS element and begin the blood effects. On mouseout I fade out the CANVAS element and stop the effects using clearTimout(); This saves on the clients CPU when the effects not in use.</p>
<p>initBlood() This is used to handle the blood effects. It should run at 25fps given you&#8217;re using a browser with a good JavaScript engine and that your CPU isn&#8217;t from before the millennium. The function will loop until the clients mouse leaves the anchor element.</p>
<h3>Step 4: View the beast</h3>
<p>To view my example simply roll your mouse over my logo. Its positioned in the top-left-hand corner.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rickyh.co.uk/halloween-logo/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
