<?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>Devirtuoso &#187; Flash</title>
	<atom:link href="http://www.devirtuoso.com/category/front-end-development/flash-front-end-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.devirtuoso.com</link>
	<description>Web Development Wickedness</description>
	<lastBuildDate>Tue, 24 Jan 2012 17:16:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Smooth Scrolling in jQuery</title>
		<link>http://www.devirtuoso.com/2011/11/smooth-scrolling-in-jquery/</link>
		<comments>http://www.devirtuoso.com/2011/11/smooth-scrolling-in-jquery/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 16:04:40 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Front End Development]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Scrolling]]></category>

		<guid isPermaLink="false">http://www.devirtuoso.com/?p=1434</guid>
		<description><![CDATA[Single page websites seem to be all the rage now a days. Scrolling effects seem to be in high demand. So in this post I&#8217;ll show you how to create a smooth scrolling page with jQuery. What are we building? We&#8217;ll be creating our own fansy smansy website. The nav will sit fixed at the [...]]]></description>
			<content:encoded><![CDATA[<p>Single page websites seem to be all the rage now a days.  Scrolling effects seem to be in high demand.  So in this post I&#8217;ll show you how to create a smooth scrolling page with jQuery.</p>
<p><span id="more-1434"></span></p>
<h3>What are we building?</h3>
<p>
	We&#8217;ll be creating our own fansy smansy website.  The nav will sit fixed at the top.  Once we click on a nav item it will scroll down to the section.  Best of all, if JavaScript is shut off, it will degrade gracefull and just jump down to the section.
</p>
<div class="resources"><a class="Download" href="http://devirtuoso.com/Examples/SmoothScroll/smoothScroll.zip" target="_blank">Download</a> <a class="Example" href="http://www.devirtuoso.com/Examples/SmoothScroll/" target="_blank">Example</a></div>
<h3>The HTML : Content</h3>
<p>First thing we need is some content to scroll.  This can be anything as long as their is enough of it to scroll&#8230;.otherwise this tutorial is pointless <img src='http://www.devirtuoso.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />   At the top of each section we&#8217;ll need to specify an id (we&#8217;ll be using this for our navigation).  It can be on anything. Really just put the id on what you want to appear at the top of the page. For this example I put it on the header tags.</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br /></div></td><td><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/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;container&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;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;section&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">h1</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;html&quot;</span>&gt;</span>HTML<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">h1</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><span style="color: #808080; font-style: italic;">&lt;!--Your HTML Content Goes HERE --&gt;</span><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><br />
&nbsp; &nbsp; <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><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;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;section&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">h1</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;css&quot;</span>&gt;</span>CSS<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">h1</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><span style="color: #808080; font-style: italic;">&lt;!--Your HTML Content Goes HERE --&gt;</span><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><br />
&nbsp; &nbsp; <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><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;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;section&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">h1</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;php&quot;</span>&gt;</span>PHP<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">h1</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><span style="color: #808080; font-style: italic;">&lt;!--Your HTML Content Goes HERE --&gt;</span><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><br />
&nbsp; &nbsp; <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><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;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;section&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">h1</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;javascript&quot;</span>&gt;</span>JavaScript<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">h1</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><span style="color: #808080; font-style: italic;">&lt;!--Your HTML Content Goes HERE --&gt;</span><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><br />
&nbsp; &nbsp; <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><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;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;section&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">h1</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;jquery&quot;</span>&gt;</span>jQuery<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">h1</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><span style="color: #808080; font-style: italic;">&lt;!--Your HTML Content Goes HERE --&gt;</span><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><br />
&nbsp; &nbsp; <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><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></td></tr></tbody></table></div>
<h3>The HTML : Navigation</h3>
<p>Now that we know what the ids are for each section we can go ahead and use those to create a navigation.</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><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/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;navigation&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#html&quot;</span>&gt;</span>HTML<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#css&quot;</span>&gt;</span>CSS<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#php&quot;</span>&gt;</span>PHP<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#javascript&quot;</span>&gt;</span>JavaScript<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#jquery&quot;</span>&gt;</span>jQuery<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;</span><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></td></tr></tbody></table></div>
<p>Now just having this when we click on the navigation it should take us down to our desired location.</p>
<h3>The CSS</h3>
<p>Nothing to Crazy here.  The most important part is the navigation.  The position:fixed attribute keeps it at the top.  And the margin top on the section class just make sure the content isn&#8217;t below the navigation when first loading the page.</p>
<div class="codecolorer-container css default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;style<span style="color: #00AA00;">&gt;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/* Made the container thin <br />
so I didn't have to come up <br />
with too much content */</span><br />
.container<span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">300px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <br />
<span style="color: #00AA00;">&#125;</span><br />
<span style="color: #808080; font-style: italic;">/* So the sections don't fall<br />
underneath the navigation */</span><br />
.section<span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">60px</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span><br />
<span style="color: #808080; font-style: italic;">/* <br />
1. Keeps the position at the top of the page.<br />
2. Adds a background so you can't see text<br />
&nbsp; &nbsp;underneath the nav.<br />
3. Adds a little padding for breathing room.<br />
*/</span><br />
.navigation<span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">fixed</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">white</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">100%</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">0px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #933;">0px</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span><br />
&lt;/style<span style="color: #00AA00;">&gt;</span></div></td></tr></tbody></table></div>
<h3>The jQuery (aka The Magic behind smooth scrolling)</h3>
<p>The jQuery isn&#8217;t overly complicated.  We&#8217;re just going to use the animate function to a specific location over time.  Now we get that location by referencing the item that has the id that the href of our navigation points to.  So if our navigation points to &#8220;#css&#8221;, then we&#8217;ll get the position of the item that has the id of &#8220;css&#8221;</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span><br />
$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</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 />
<br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Click event for any anchor tag that's href starts with #</span><br />
&nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'a[href^=&quot;#&quot;]'</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>event<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// The id of the section we want to go to.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> id <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;href&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// An offset to push the content down from the top.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> offset <span style="color: #339933;">=</span> <span style="color: #CC0000;">60</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Our scroll target : the top position of the</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// section that has the id referenced by our href.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> target <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>id<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">offset</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">top</span> <span style="color: #339933;">-</span> offset<span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// The magic...smooth scrollin' goodness.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'html, body'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>scrollTop<span style="color: #339933;">:</span>target<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">500</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">//prevent the page from jumping down to our section.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; event.<span style="color: #660066;">preventDefault</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><br />
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></div></td></tr></tbody></table></div>
<h3>Putting it all together</h3>
<p>Here is everything all in one.</p>
<p>Enjoy!</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br />73<br />74<br />75<br />76<br />77<br />78<br />79<br />80<br />81<br />82<br />83<br />84<br />85<br />86<br />87<br />88<br />89<br />90<br />91<br />92<br />93<br />94<br />95<br />96<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #00bbdd;">&lt;!DOCTYPE HTML&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">html</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">head</span></a>&gt;</span><br />
<br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/meta.html"><span style="color: #000000; font-weight: bold;">meta</span></a> <span style="color: #000066;">charset</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;UTF-8&quot;</span>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">title</span></a>&gt;</span>Smooth Scrolling<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">title</span></a>&gt;</span><br />
<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>&gt;</span><br />
<br />
/* Made the container thin <br />
so I didn't have to come up <br />
with too much content */<br />
.container{<br />
&nbsp; &nbsp; width:300px;<br />
&nbsp; &nbsp; margin:0 auto;<br />
&nbsp; &nbsp; <br />
}<br />
/* So the sections don't fall<br />
underneath the navigation */<br />
.section{<br />
&nbsp; &nbsp; margin-top:60px;<br />
}<br />
/* <br />
1. Keeps the position at the top of the page.<br />
2. Adds a background so you can't see text<br />
&nbsp; &nbsp;underneath the nav.<br />
3. Adds a little padding for breathing room.<br />
*/<br />
.navigation{<br />
&nbsp; &nbsp; position: fixed;<br />
&nbsp; &nbsp; background:white;<br />
&nbsp; &nbsp; padding:20px 20px;<br />
&nbsp; &nbsp; width:100%;<br />
&nbsp; &nbsp; margin-top:0px;<br />
&nbsp; &nbsp; top:0px;<br />
}<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 />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">head</span></a>&gt;</span><br />
<br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">body</span></a>&gt;</span><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;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;container&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;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;navigation&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#html&quot;</span>&gt;</span>HTML<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#css&quot;</span>&gt;</span>CSS<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#php&quot;</span>&gt;</span>PHP<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#javascript&quot;</span>&gt;</span>JavaScript<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#jquery&quot;</span>&gt;</span>jQuery<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;</span><br />
&nbsp; &nbsp; <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><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;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;section&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">h1</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;html&quot;</span>&gt;</span>HTML<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">h1</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><span style="color: #808080; font-style: italic;">&lt;!--Your HTML Content Goes HERE --&gt;</span><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><br />
&nbsp; &nbsp; <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><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;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;section&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">h1</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;css&quot;</span>&gt;</span>CSS<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">h1</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><span style="color: #808080; font-style: italic;">&lt;!--Your HTML Content Goes HERE --&gt;</span><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><br />
&nbsp; &nbsp; <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><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;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;section&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">h1</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;php&quot;</span>&gt;</span>PHP<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">h1</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><span style="color: #808080; font-style: italic;">&lt;!--Your HTML Content Goes HERE --&gt;</span><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><br />
&nbsp; &nbsp; <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><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;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;section&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">h1</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;javascript&quot;</span>&gt;</span>JavaScript<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">h1</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><span style="color: #808080; font-style: italic;">&lt;!--Your HTML Content Goes HERE --&gt;</span><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><br />
&nbsp; &nbsp; <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><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;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;section&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">h1</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;jquery&quot;</span>&gt;</span>jQuery<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">h1</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><span style="color: #808080; font-style: italic;">&lt;!--Your HTML Content Goes HERE --&gt;</span><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><br />
&nbsp; &nbsp; <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><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><br />
<br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span><br />
$(document).ready(function() {<br />
<br />
&nbsp; &nbsp; // Click event for any anchor tag that's href starts with #<br />
&nbsp; &nbsp; $('a[href^=&quot;#&quot;]').click(function(event) {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; // The id of the section we want to go to.<br />
&nbsp; &nbsp; &nbsp; &nbsp; var id = $(this).attr(&quot;href&quot;);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; // An offset to push the content down from the top.<br />
&nbsp; &nbsp; &nbsp; &nbsp; var offset = 60;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; // Our scroll target : the top position of the<br />
&nbsp; &nbsp; &nbsp; &nbsp; // section that has the id referenced by our href.<br />
&nbsp; &nbsp; &nbsp; &nbsp; var target = $(id).offset().top - offset;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; // The magic...smooth scrollin' goodness.<br />
&nbsp; &nbsp; &nbsp; &nbsp; $('html, body').animate({scrollTop:target}, 500);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //prevent the page from jumping down to our section.<br />
&nbsp; &nbsp; &nbsp; &nbsp; event.preventDefault();<br />
&nbsp; &nbsp; });<br />
});<br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span><br />
<br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">body</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">html</span></a>&gt;</span></div></td></tr></tbody></table></div>
<div class="resources"><a class="Download" href="http://devirtuoso.com/Examples/SmoothScroll/smoothScroll.zip" target="_blank">Download</a> <a class="Example" href="http://www.devirtuoso.com/Examples/SmoothScroll/" target="_blank">Example</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.devirtuoso.com/2011/11/smooth-scrolling-in-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Add an AddThis.com Component to Your Flash Site</title>
		<link>http://www.devirtuoso.com/2009/07/how-to-add-an-addthis-com-component-to-your-flash-site/</link>
		<comments>http://www.devirtuoso.com/2009/07/how-to-add-an-addthis-com-component-to-your-flash-site/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 08:13:30 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Front End Development]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://www.devirtuoso.com/?p=606</guid>
		<description><![CDATA[The AddThis.com component allows for an easy way to add social website links to your website. Unfortunately they don&#8217;t have a flash component yet. I will show you a work around so you can quickly add this to any flash site you may have. Example Download The Theory The title of this post might be [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.addthis.com" target="_blank" >AddThis.com</a> component allows for an easy way to add social website links to your website. Unfortunately they don&#8217;t have a flash component yet.  I will show you a work around so you can quickly add this to any flash site you may have.</p>
<p><span id="more-606"></span></p>
<h3><a href="http://www.devirtuoso.com/Examples/Flash-AddThis/flash-addThis-example.html" target="_blank" >Example</a></h3>
<h3><a href="http://www.devirtuoso.com/Examples/Flash-AddThis/example.zip" target="_blank" >Download</a></h3>
<h3>The Theory</h3>
<p>The title of this post might be a bit misleading. Technically we won&#8217;t be adding the addThis component to the flash, we&#8217;re going to float it above the flash. Then have the flash communicate with the JavaScript to position it where it needs to go.  To the user it will look like it is part of the flash.</p>
<h3>Creating The Flash</h3>
<p>In this example we will be adding the addThis component below a menu. In the timeline I created a MovieClip with the name &#8220;menu&#8221; and placed the menu inside of this. You&#8217;re probably going to have your own setup, I&#8217;m just using the menu so I can position the component relative to where the menu is.</p>
<p><img class="alignnone size-full wp-image-608" title="flash-screenshot" src="http://www.devirtuoso.com/wp-content/uploads/2009/07/flash-screenshot.gif" alt="flash-screenshot" width="400" height="451" /></p>
<p><strong>ActionScript</strong></p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br /></div></td><td><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">//Place the component at the bottom left of the menu</span><br />
<span style="color: #808080; font-style: italic;">//(You can place any x and y co-ordinates here)</span><br />
positionAddThis<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">menu</span>.<span style="color: #006600;">x</span>, <span style="color: #0066CC;">menu</span>.<span style="color: #006600;">y</span> + <span style="color: #0066CC;">menu</span>.<span style="color: #0066CC;">height</span> +<span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">//Position Addthis.com component</span><br />
<span style="color: #000000; font-weight: bold;">function</span> positionAddThis<span style="color: #66cc66;">&#40;</span>x,y<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//Values have to be integers</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">left</span> = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">round</span><span style="color: #66cc66;">&#40;</span>x<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> top = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">round</span><span style="color: #66cc66;">&#40;</span>y<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//Calling JavaScript Function moveAddThis(top,Left)</span><br />
&nbsp; &nbsp; ExternalInterface.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;moveAddThis&quot;</span>,top , <span style="color: #0066CC;">left</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span></div></td></tr></tbody></table></div>
<p>You&#8217;re going to have to play around with the x and y values a bit later to get everything to line up perfectly.</p>
<h3>Load the Flash</h3>
<p>Now that we have the flash, we need to embed it into an html file. I&#8217;ll be using <a href="http://code.google.com/p/swfobject/" target="_blank" >swfObject</a>, but you can use any method you like.  Just make sure the <strong>wmode</strong> is set to <strong>transparent</strong>, otherwise the flash will be on top of your component.</p>
<p>You can also add the script for the addThis component at this point.  You can pick this up on <a href="http://www.addthis.com" target="_blank" >addThis.com&#8217;s website</a>. We&#8217;re going to wrap the script within a div with an id so we can reference it later.</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br /></div></td><td><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/html.html"><span style="color: #000000; font-weight: bold;">html</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">head</span></a>&gt;</span><br />
&nbsp; &nbsp; <br />
<span style="color: #808080; font-style: italic;">&lt;!-- Embed Flash using swfobject. (Can use any method of embeding flash here) --&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;swfobject.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span><br />
&nbsp; &nbsp; var flashvars = {};<br />
&nbsp; &nbsp; var params = {};<br />
&nbsp; &nbsp; var attributes = {};<br />
&nbsp; &nbsp; attributes.id = &quot;example&quot;;<br />
&nbsp; &nbsp; params.wmode = &quot;transparent&quot;;<br />
&nbsp; &nbsp; swfobject.embedSWF(&quot;example.swf&quot;, &quot;website&quot;, &quot;800&quot;, &quot;600&quot;, &quot;9.0.0&quot;, false, flashvars, params, attributes);<br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span><br />
<br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">head</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">body</span></a>&gt;</span><br />
&nbsp; &nbsp; <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;website&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">&lt;!-- Flash Will Go Here --&gt;</span><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><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;addThisBtn&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">&lt;!-- Add Script Given By AddThis.com --&gt;</span><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><br />
&nbsp; &nbsp; <br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">body</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">html</span></a>&gt;</span></div></td></tr></tbody></table></div>
<h3>Positioning the AddThis Component</h3>
<p>At this point we have the flash loaded and calling a JavaScript function that doesn&#8217;t exist yet. So lets create that function. We will also add the CSS that will put the component on top of the flash.</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br /></div></td><td><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> <span style="color: #000066;">media</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;screen&quot;</span>&gt;</span><br />
&nbsp; &nbsp; /* Places the addthis button on top of flash */<br />
&nbsp; &nbsp; #addThisBtn{<br />
&nbsp; &nbsp; &nbsp; &nbsp; position:absolute;<br />
&nbsp; &nbsp; &nbsp; &nbsp; z-index:1000;<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: #808080; font-style: italic;">&lt;!-- Load JQuery --&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://code.jquery.com/jquery-latest.pack.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">charset</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;utf-8&quot;</span>&gt;</span><br />
<br />
// Function for letting flash position the button <br />
function moveAddThis(top, left){<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; //Changes css top and left properties of<br />
&nbsp; &nbsp; //the addThis div wrapper.<br />
&nbsp; &nbsp; $(&quot;#addThisBtn&quot;).css(&quot;top&quot;, top+&quot;px&quot;);<br />
&nbsp; &nbsp; $(&quot;#addThisBtn&quot;).css(&quot;left&quot;, left+&quot;px&quot;);<br />
&nbsp; &nbsp; <br />
}<br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span></div></td></tr></tbody></table></div>
<p>The last thing you&#8217;ll need to do is test it out and make sure the button is showing up where you need it. You might have to do some tweaking but you can eventually get it where you need it.</p>
<h3><a href="http://www.devirtuoso.com/Examples/Flash-AddThis/flash-addThis-example.html" target="_blank" >Example</a></h3>
<h3><a href="http://www.devirtuoso.com/Examples/Flash-AddThis/example.zip" target="_blank" >Download</a></h3>
]]></content:encoded>
			<wfw:commentRss>http://www.devirtuoso.com/2009/07/how-to-add-an-addthis-com-component-to-your-flash-site/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>HTML vs Flash Websites. Which is Better?</title>
		<link>http://www.devirtuoso.com/2009/05/html-vs-flash-websites-which-is-better/</link>
		<comments>http://www.devirtuoso.com/2009/05/html-vs-flash-websites-which-is-better/#comments</comments>
		<pubDate>Fri, 29 May 2009 09:32:29 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Front End Development]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.devirtuoso.com/?p=346</guid>
		<description><![CDATA[There has always been a feud between die hard Flash and HTML developers as to which is better. So why not lay out some pros and cons of each and see which one ends up on top. HTML HTML has always been the backbone of the Internet. It&#8217;s simple to use and learn, but it [...]]]></description>
			<content:encoded><![CDATA[<p>There has always been a feud between die hard <a href="http://en.wikipedia.org/wiki/Adobe_Flash" target="_blank">Flash</a> and <a title="HTML" href="http://www.w3schools.com/htmL/" target="_blank">HTML</a> developers as to which is better. So why not lay out some pros and cons of each and see which one ends up on top.</p>
<p><span id="more-346"></span></p>
<h2>HTML</h2>
<p><a title="HTML" href="http://www.w3schools.com/htmL/" target="_blank">HTML</a> has always been the backbone of the Internet. It&#8217;s simple to use and learn, but it also comes with its faults. Here are the pros and cons of <a title="HTML" href="http://www.w3schools.com/htmL/" target="_blank">HTML</a></p>
<h3 style="color:#66A23B;">HTML pros</h3>
<ul>
<li><strong><acronym title="Search Engine Optimization">SEO</acronym></strong><br />
Any thing you type can be crawled by the major search engines. Granted you can do <acronym title="Search Engine Optimization">SEO</acronym> in <a href="http://en.wikipedia.org/wiki/Adobe_Flash" target="_blank">Flash</a>, but it is no where as easy as <a title="HTML" href="http://www.w3schools.com/htmL/" target="_blank">HTML</a>.</li>
<li><strong>Easy to learn and use</strong><br />
Even the most novice user can use <a title="HTML" href="http://www.w3schools.com/htmL/" target="_blank">HTML</a>. With all the <acronym title="What You See Is What You Get">WYSIWYG</acronym> editors out there, practically anybody can create a website now-a-days.</li>
<li><strong>Widgets</strong><br />
There are a lot of widgets out there that you can just plug into your website with little to no trouble, and gain a load of new features. (Google AdSense, Addthis.com share button, Google maps)</li>
<li><strong>Easy integration with back end languages</strong><br />
It is simple to display text from back end languages like PHP or ASP.  A simple echo or print method and it&#8217;s up on your website.</li>
<li><strong><acronym title="Content Management System">CMS</acronym> Integration</strong><br />
There are thousands of pre-built <acronym title="Content Management System">CMS</acronym> out there that cater to <a title="HTML" href="http://www.w3schools.com/htmL/" target="_blank">HTML</a>. Simple to install and simple to use.</li>
<li><strong>Good problem solving tools</strong><br />
With tools like Firebug for FireFox, and with new browsers adding built in features, it is becoming increasingly easier to debug any shotty code.</li>
<li><strong>Availability</strong><br />
Anybody that surfs the web can view <a title="HTML" href="http://www.w3schools.com/htmL/" target="_blank">HTML</a>.  This is good for any new devices on the market that want to integrate the web into their device. You can always be sure that they will be able to see your <a title="HTML" href="http://www.w3schools.com/htmL/" target="_blank">HTML</a>.</li>
<li><strong>Loading Times</strong><br />
Due to the lack of complexity on most <a title="HTML" href="http://www.w3schools.com/htmL/" target="_blank">HTML</a> pages, load times are fairly quick.</li>
</ul>
<h3 style="color:#9F1326;">HTML cons</h3>
<ul>
<li><strong>HTML is static</strong><br />
<a title="HTML" href="http://www.w3schools.com/htmL/" target="_blank">HTML</a> doesn&#8217;t have a lot of flair and smooth transitions.  It&#8217;s pretty static.  With <a href="http://en.wikipedia.org/wiki/JavaScript" target="_blank">JavaScript</a> improving with leaps and bounds this may not be the case in years to come.</li>
<li><strong>Fonts</strong><br />
You have to use system safe fonts.  Again this may change with popularity of <acronym title="Cascading Style Sheets">CSS</acronym> 3. There are already a couple of <a href="http://en.wikipedia.org/wiki/JavaScript" target="_blank">JavaScript</a> solutions that fix this, but speed is an issue for larger bodies of text.</li>
<li><strong>Hard to make look exactly like creative</strong><br />
If you have a designer that demands the website looks exactly like the creative in every browser, down to the last pixel&#8230;good luck.  Not an easy task, especially with older browsers.  It&#8217;s slowly getting better though.  The more browsers follow standards, the easier it will get.</li>
<li><strong>Bugs</strong><br />
Browsers are buggy. I&#8217;m sorry if you&#8217;re an <acronym title="Internet Explorer">IE</acronym> fan, but older versions of <acronym title="Internet Explorer">IE</acronym> are EVIL. Especially in the <acronym title="Cascading Style Sheets">CSS</acronym> realm, things don&#8217;t work the way they&#8217;re suppose to.  Again this is getting better with every new browser release.</li>
<li><strong>Different browsers</strong><br />
As much as I love Google Chrome, it&#8217;s yet another browser you have to make sure your website looks good in.  After checking all browsers in different operating systems, this can really take up a chunk of your time.  There are some tools to help expedite the process, but it&#8217;s still a pain.</li>
</ul>
<h2>Flash</h2>
<p>Without a doubt <a href="http://en.wikipedia.org/wiki/Adobe_Flash" target="_blank">Flash</a> is known for it&#8217;s interactivity and flashy effects&#8230;hence the name. You can do some seriously involving things but it comes with it&#8217;s faults as well.  Here is a list of pros and cons for <a href="http://en.wikipedia.org/wiki/Adobe_Flash" target="_blank">Flash</a></p>
<h3 style="color:#66A23B;">Flash pros</h3>
<ul>
<li><strong>Interactivity</strong><br />
The ability to seriously involve a user is one of <a href="http://en.wikipedia.org/wiki/Adobe_Flash" target="_blank">Flash</a>&#8216;s strengths. With 3d graphics and smooth transitions it can really keep a users attention.</li>
<li><strong>Vector Artwork</strong><br />
Up until recently <a title="HTML" href="http://www.w3schools.com/htmL/" target="_blank">HTML</a>/<a href="http://en.wikipedia.org/wiki/JavaScript" target="_blank">JavaScript</a> couldn&#8217;t display/animate vector artwork. <a href="http://en.wikipedia.org/wiki/Adobe_Flash" target="_blank">Flash</a> was your only option if you wanted anything either than a graphic and text.</li>
<li><strong>Animation</strong><br />
Any sort of animation <a href="http://en.wikipedia.org/wiki/Adobe_Flash" target="_blank">Flash</a> can handle like a pro.  This makes complex transitions, and immersing displays far more feasible than <a title="HTML" href="http://www.w3schools.com/htmL/" target="_blank">HTML</a>.</li>
<li><strong>Packaged Up</strong><br />
With services like YouTube&#8217;s player you can have a full video player just by embedding it into your code.</li>
<li><strong>No reload</strong><br />
<a href="http://en.wikipedia.org/wiki/Adobe_Flash" target="_blank">Flash</a> doesn&#8217;t need to reload the page after each request.  Granted <a title="HTML" href="http://www.w3schools.com/htmL/" target="_blank">HTML</a> can do this with the help of AJAX but it&#8217;s automatic for <a href="http://en.wikipedia.org/wiki/Adobe_Flash" target="_blank">Flash</a>.</li>
<li><strong>Built in components</strong><br />
<a href="http://en.wikipedia.org/wiki/Adobe_Flash" target="_blank">Flash</a> offers a variety of different components that you can skin and use to your liking. Styling form components in <a title="HTML" href="http://www.w3schools.com/htmL/" target="_blank">HTML</a> is possible, but more difficult than <a href="http://en.wikipedia.org/wiki/Adobe_Flash" target="_blank">Flash</a>.</li>
<li><strong>Immersing experience</strong><br />
This is why most micro sites are done in <a href="http://en.wikipedia.org/wiki/Adobe_Flash" target="_blank">Flash</a>.  It offers the user an experience not just a page view. It has the ability to get people excited about a product or a service.</li>
<li><strong>Audio, video, upload</strong><br />
Media is generally handled better in <a href="http://en.wikipedia.org/wiki/Adobe_Flash" target="_blank">Flash</a> than <a title="HTML" href="http://www.w3schools.com/htmL/" target="_blank">HTML</a>. Most players you see on the web are <a href="http://en.wikipedia.org/wiki/Adobe_Flash" target="_blank">Flash</a> based.  Also multiple uploading is a nice feature that <a href="http://en.wikipedia.org/wiki/Adobe_Flash" target="_blank">Flash</a> offers.</li>
<li><strong>Pixel Perfect</strong><br />
You can design the website to look exactly like the creative with little to no trouble because it looks the same in all browsers.</li>
<li><strong>Fonts</strong><br />
You have a font on your machine&#8230;you can use it.</li>
<li><strong>Games</strong><br />
Online games lend themselves to be done in <a href="http://en.wikipedia.org/wiki/Adobe_Flash" target="_blank">Flash</a>.</li>
</ul>
<h3>Flash cons</h3>
<ul>
<li><strong>Requires plug-in</strong><br />
<a href="http://en.wikipedia.org/wiki/Adobe_Flash" target="_blank">Flash</a> requires the user to download a plug-in to view it. You don&#8217;t have the plug-in you don&#8217;t see the <a href="http://en.wikipedia.org/wiki/Adobe_Flash" target="_blank">Flash</a>.</li>
<li><strong><acronym title="Search Engine Optimization">SEO</acronym></strong><br />
Although <acronym title="Search Engine Optimization">SEO</acronym> can be done in <a href="http://en.wikipedia.org/wiki/Adobe_Flash" target="_blank">Flash</a>, it&#8217;s a laborious task.</li>
<li><strong>Accessibility</strong><br />
<a href="http://en.wikipedia.org/wiki/Adobe_Flash" target="_blank">Flash</a> has added some features to help with screen readers. This still doesn&#8217;t compare to <a title="HTML" href="http://www.w3schools.com/htmL/" target="_blank">HTML</a> though.</li>
<li><strong>Print Problems</strong><br />
There are a list of problems when trying to print from <a href="http://en.wikipedia.org/wiki/Adobe_Flash" target="_blank">Flash</a>.</li>
<li><strong>Can get confusing</strong><br />
The overall <a href="http://en.wikipedia.org/wiki/Adobe_Flash" target="_blank">Flash</a> file can get confusing, especially when you are trying to work off someone&#8217;s file.  Layers upon layers of code can really mess things up.</li>
<li><strong>Bad testing tools</strong><br />
The testing tools within the <a href="http://en.wikipedia.org/wiki/Adobe_Flash" target="_blank">Flash</a> <acronym title="Integrated development environment">IDE</acronym> suck. Plain and simple. So much so, that most people don&#8217;t code in <a href="http://en.wikipedia.org/wiki/Adobe_Flash" target="_blank">Flash</a>, and <a href="http://www.insideria.com/2009/05/new-poll-what-ide-do-you-use-t.html">use other <acronym title="Integrated development environment">IDE</acronym>s</a>.</li>
<li><strong>Loading times</strong><br />
Generally speaking, <a href="http://en.wikipedia.org/wiki/Adobe_Flash" target="_blank">Flash</a> files take longer to load.  Since there is a lot more interactivity, this affects load times.</li>
</ul>
<h2>Conclusion</h2>
<p>Given the pros and cons of each it becomes clear why there is such a debate.  It really comes down to what you need done.  If you want a Blog like website, you&#8217;re going to go with <a title="HTML" href="http://www.w3schools.com/htmL/" target="_blank">HTML</a>.  If you want more of a interactive site, go with Flash. In about 10 years <a href="http://en.wikipedia.org/wiki/JavaScript" target="_blank">JavaScript</a> and <a title="HTML" href="http://www.w3schools.com/htmL/" target="_blank">HTML</a> 5 might give <a href="http://en.wikipedia.org/wiki/Adobe_Flash" target="_blank">Flash</a> a run for its money, until then there is no real winner.  Right now it&#8217;s best to use the strengths of each and use them together in harmony.</p>
<p>Did I miss some pros and cons? Let us know which you type of website you prefer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devirtuoso.com/2009/05/html-vs-flash-websites-which-is-better/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Gaia Flash Framework: Speed up Development for All Flash Sites</title>
		<link>http://www.devirtuoso.com/2009/05/gaia-flash-framework-speed-up-development-for-all-flash-sites/</link>
		<comments>http://www.devirtuoso.com/2009/05/gaia-flash-framework-speed-up-development-for-all-flash-sites/#comments</comments>
		<pubDate>Wed, 27 May 2009 14:26:08 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Front End Development]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.devirtuoso.com/?p=318</guid>
		<description><![CDATA[For all you flash developers out there this is a real treat. Gaia is a flash framework that can speed up development drastically for your all flash sites. I can&#8217;t wait to try and use this in on a project. It gives you a simple way to handle the navigation, transitions between pages, preloading and [...]]]></description>
			<content:encoded><![CDATA[<p>For all you flash developers out there this is a real treat. <a title="Gaia Flash Framework" href="http://www.gaiaflashframework.com/" target="_blank">Gaia</a> is a flash framework that can speed up development drastically for your all flash sites.</p>
<p><span id="more-318"></span><a title="Gaia Flash Framework" href="http://www.gaiaflashframework.com/" target="_blank"><img class="alignnone size-full wp-image-319" title="gaia-flash-framework" src="http://www.devirtuoso.com/wp-content/uploads/2009/05/gaia-flash-framework.jpg" alt="gaia-flash-framework" width="600" height="116" /></a><br />
I can&#8217;t wait to try and use this in on a project.  It gives you a simple way to handle the navigation, transitions between pages, preloading and deeplinking. Talk about a time saver.  That&#8217;s half a website right there. Oh&#8230;did I mention that it also handles <a title="SEO - Search Engine Optimization" href="http://en.wikipedia.org/wiki/Search_engine_optimization" target="_blank"><acronym title="Search Engine Optimization">SEO</acronym></a>.  It uses an <a title="XHTML - Extensible HypertText Markup Language" href="http://www.w3.org/TR/xhtml1/" target="_blank">XHTML</a> file that serves as both the data source and the embed page for each page in your site.  The way the site is structured seems logical, and doesn&#8217;t seem to get in your way of building a great web site.</p>
<p>Here is a video that walks you through the framework : <a title="Gaia Flash Framework Screencast" href="http://www.gaiaflashframework.com/screencasts/lesson1/" target="_blank">Gaia Screencast</a><br />
Here is their website: <a title="Gaia Flash Framework Website" href="http://www.gaiaflashframework.com/" target="_blank">Gaia Website</a><br />
Here is the download page: <a title="Gaia Flash Framework Download" href="http://www.gaiaflashframework.com/index.php/topic,1808.0.html" target="_blank">Gaia Download</a></p>
<p>For those of you that have used this framework before, we would love to here your input on it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devirtuoso.com/2009/05/gaia-flash-framework-speed-up-development-for-all-flash-sites/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>10 Beautiful Flash Websites</title>
		<link>http://www.devirtuoso.com/2009/05/10-beautiful-flash-websites/</link>
		<comments>http://www.devirtuoso.com/2009/05/10-beautiful-flash-websites/#comments</comments>
		<pubDate>Tue, 26 May 2009 04:15:51 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[showcase]]></category>

		<guid isPermaLink="false">http://www.devirtuoso.com/?p=290</guid>
		<description><![CDATA[Here is a list of 10 beautiful flash website that will make you weep from their beauty. They all have a fantastic interface, and should be commended at how well they&#8217;ve been put together. Kudos to the developers and designers of the sites. Very impressive work. Toyota Prius &#160; Nissan Good Decision &#160; Umbro &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a list of 10 beautiful flash website that will make you weep from their beauty.  They all have a fantastic interface, and should be commended at how well they&#8217;ve been put together. Kudos to the developers and designers of the sites. Very impressive work.</p>
<p><span id="more-290"></span></p>
<h3><a title="Flash Website - New Prius" href="http://www.toyota.com/vehicles/minisite/newprius/" target="_blank">Toyota Prius</a></h3>
<p><a title="Flash Website - New Prius" href="http://www.toyota.com/vehicles/minisite/newprius/" target="_blank"><img class="alignnone size-full wp-image-291" title="toyota-prius" src="http://www.devirtuoso.com/wp-content/uploads/2009/05/toyota-prius.jpg" alt="toyota-prius" width="600" height="336" /></a></p>
<p>&nbsp;</p>
<h3><a title="Flash Website - Nissan Good Decision" href="http://www.nissangooddecision.com/" target="_blank">Nissan Good Decision</a></h3>
<p><a href="http://www.nissangooddecision.com/" title="Flash Website - Nissan Good Decision" target="_blank" ><img class="alignnone size-full wp-image-292" title="Flash Website - Nissan Good Decision" src="http://www.devirtuoso.com/wp-content/uploads/2009/05/nissan-good-decision.jpg" alt="Flash Website - Nissan Good Decision" width="600" height="336" /></a></p>
<p>&nbsp;</p>
<h3><a title="Flash Website - Umbro" href="http://www.umbro.com/" target="_blank">Umbro</a></h3>
<p><a href="http://www.umbro.com/" title="Flash Website - Umbro" target="_blank" ><img class="alignnone size-full wp-image-293" title="Flash Website - Umbro" src="http://www.devirtuoso.com/wp-content/uploads/2009/05/umbro.jpg" alt="Flash Website - Umbro" width="600" height="336" /></a></p>
<p>&nbsp;</p>
<h3><a title="Flash Website - Labuat" href="http://soytuaire.labuat.com/" target="_blank">Labuat</a></h3>
<p><a title="Flash Website - Labuat" href="http://soytuaire.labuat.com/" target="_blank"><img class="alignnone size-full wp-image-294" title="Flash Website - Labuat" src="http://www.devirtuoso.com/wp-content/uploads/2009/05/labuat.jpg" alt="Flash Website - Labuat" width="600" height="371" /></a></p>
<p>&nbsp;</p>
<h3><a title="Flash Website - Diesel Fragrances" href="http://www.diesel-fragrances.ca/_en/_ca/otb/index.aspx" target="_blank">Diesel Fragrances</a></h3>
<p><a title="Flash Website - Diesel Fragrances" href="http://www.diesel-fragrances.ca/_en/_ca/otb/index.aspx" target="_blank"><img class="alignnone size-full wp-image-295" title="Flash Website - Diesel Fragrances" src="http://www.devirtuoso.com/wp-content/uploads/2009/05/diesel.jpg" alt="Flash Website - Diesel Fragrances" width="600" height="341" /></a></p>
<p>&nbsp;</p>
<h3><a title="Flash Website - Nissan" href="http://www.nissan.co.uk/" target="_blank">Nissan</a></h3>
<p><a title="Flash Website - Nissan" href="http://www.nissan.co.uk/" target="_blank"><img class="alignnone size-full wp-image-296" title="Flash Website - Nissan" src="http://www.devirtuoso.com/wp-content/uploads/2009/05/nissan.jpg" alt="Flash Website - Nissan" width="600" height="341" /></a></p>
<p>&nbsp;</p>
<h3><a title="Flash Website - Ark +" href="http://www.ark-plus.com/#/En/main/" target="_blank">Ark +</a></h3>
<p><a title="Flash Website - Ark +" href="http://www.ark-plus.com/#/En/main/" target="_blank"><img class="alignnone size-full wp-image-297" title="Flash Website - Ark +" src="http://www.devirtuoso.com/wp-content/uploads/2009/05/ark-plus.jpg" alt="Flash Website - Ark +" width="600" height="341" /></a></p>
<p>&nbsp;</p>
<h3><a title="Flash Website - Paint With Ben" href="http://www.paintwithben.com/ben-webapp/index.jsp" target="_blank">Paint With Ben</a></h3>
<p><a title="Flash Website - Paint With Ben" href="http://www.paintwithben.com/ben-webapp/index.jsp" target="_blank"><img class="alignnone size-full wp-image-298" title="Flash Website - Paint With Ben" src="http://www.devirtuoso.com/wp-content/uploads/2009/05/paint-with-ben.jpg" alt="Flash Website - Paint With Ben" width="600" height="358" /></a></p>
<p>&nbsp;</p>
<h3><a title="Flash Website - Puma Lift" href="http://lift.puma.com/" target="_blank">Puma Lift</a></h3>
<p><a title="Flash Website - Puma Lift" href="http://lift.puma.com/" target="_blank"><img class="alignnone size-full wp-image-299" title="Flash Website - Puma Lift" src="http://www.devirtuoso.com/wp-content/uploads/2009/05/puma-lift.jpg" alt="Flash Website - Puma Lift" width="600" height="309" /></a></p>
<p>&nbsp;</p>
<h3><a title="Flash Website - GE Ecomagination" href="http://ge.ecomagination.com/smartgrid/#/landing_page" target="_blank">GE &#8211; Ecomagination</a></h3>
<p><a title="Flash Website - GE Ecomagination" href="http://ge.ecomagination.com/smartgrid/#/landing_page" target="_blank"><img class="alignnone size-full wp-image-300" title="Flash Website - GE Ecomagination" src="http://www.devirtuoso.com/wp-content/uploads/2009/05/ge-ecomagination.jpg" alt="Flash Website - GE Ecomagination" width="600" height="278" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.devirtuoso.com/2009/05/10-beautiful-flash-websites/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: www.devirtuoso.com @ 2012-02-04 15:38:36 -->
