<?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>Lincity</title>
	<atom:link href="http://lincity.co.uk/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://lincity.co.uk/blog</link>
	<description>My Photo&#039;s, Website&#039;s and Code</description>
	<lastBuildDate>Wed, 13 Jan 2010 10:38:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Flash Cover Flow (part1)</title>
		<link>http://lincity.co.uk/blog/?p=142</link>
		<comments>http://lincity.co.uk/blog/?p=142#comments</comments>
		<pubDate>Wed, 13 Jan 2010 10:13:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://lincity.co.uk/blog/?p=142</guid>
		<description><![CDATA[ 

Web gallery built in flash to produce a coverflow like component.
This is an updated implementation of the popular coverflow way of display images. With the release of flash 10 with new 3D capabilities, this allows for a much easier and fast implantation of this popular web component.

File Main.AS
package {
    ////////////////////////////////////////////
    // IMPORTS
    ////////////////////////////////////////////
    //import [...]]]></description>
			<content:encoded><![CDATA[<p><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves /> <w:TrackFormatting /> <w:PunctuationKerning /> <w:ValidateAgainstSchemas /> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF /> <w:LidThemeOther>EN-GB</w:LidThemeOther> <w:LidThemeAsian>X-NONE</w:LidThemeAsian> <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> <w:Compatibility> <w:BreakWrappedTables /> <w:SnapToGridInCell /> <w:WrapTextWithPunct /> <w:UseAsianBreakRules /> <w:DontGrowAutofit /> <w:SplitPgBreakAndParaMark /> <w:DontVertAlignCellWithSp /> <w:DontBreakConstrainedForcedTables /> <w:DontVertAlignInTxbx /> <w:Word11KerningPairs /> <w:CachedColBalance /> </w:Compatibility> <m:mathPr> <m:mathFont m:val="Cambria Math" /> <m:brkBin m:val="before" /> <m:brkBinSub m:val="&#45;-" /> <m:smallFrac m:val="off" /> <m:dispDef /> <m:lMargin m:val="0" /> <m:rMargin m:val="0" /> <m:defJc m:val="centerGroup" /> <m:wrapIndent m:val="1440" /> <m:intLim m:val="subSup" /> <m:naryLim m:val="undOvr" /> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"   DefSemiHidden="true" DefQFormat="false" DefPriority="99"   LatentStyleCount="267"> <w:LsdException Locked="false" Priority="0" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Normal" /> <w:LsdException Locked="false" Priority="9" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="heading 1" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9" /> <w:LsdException Locked="false" Priority="39" Name="toc 1" /> <w:LsdException Locked="false" Priority="39" Name="toc 2" /> <w:LsdException Locked="false" Priority="39" Name="toc 3" /> <w:LsdException Locked="false" Priority="39" Name="toc 4" /> <w:LsdException Locked="false" Priority="39" Name="toc 5" /> <w:LsdException Locked="false" Priority="39" Name="toc 6" /> <w:LsdException Locked="false" Priority="39" Name="toc 7" /> <w:LsdException Locked="false" Priority="39" Name="toc 8" /> <w:LsdException Locked="false" Priority="39" Name="toc 9" /> <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption" /> <w:LsdException Locked="false" Priority="0" Name="List Bullet 2" /> <w:LsdException Locked="false" Priority="10" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Title" /> <w:LsdException Locked="false" Priority="0" Name="Closing" /> <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font" /> <w:LsdException Locked="false" Priority="0" Name="Body Text" /> <w:LsdException Locked="false" Priority="11" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtitle" /> <w:LsdException Locked="false" Priority="0" Name="Salutation" /> <w:LsdException Locked="false" Priority="0" Name="Date" /> <w:LsdException Locked="false" Priority="22" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Strong" /> <w:LsdException Locked="false" Priority="20" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Emphasis" /> <w:LsdException Locked="false" Priority="59" SemiHidden="false"    UnhideWhenUsed="false" Name="Table Grid" /> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text" /> <w:LsdException Locked="false" Priority="1" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="No Spacing" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 1" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 1" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 1" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 1" /> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision" /> <w:LsdException Locked="false" Priority="34" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="List Paragraph" /> <w:LsdException Locked="false" Priority="29" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Quote" /> <w:LsdException Locked="false" Priority="30" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Quote" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 1" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 1" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 1" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 1" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 1" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 2" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 2" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 2" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 2" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 2" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 2" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 2" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 2" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 2" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 3" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 3" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 3" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 3" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 3" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 3" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 3" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 3" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 3" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 4" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 4" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 4" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 4" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 4" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 4" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 4" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 4" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 4" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 5" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 5" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 5" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 5" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 5" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 5" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 5" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 5" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 5" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 6" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 6" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 6" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 6" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 6" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 6" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 6" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 6" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 6" /> <w:LsdException Locked="false" Priority="19" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis" /> <w:LsdException Locked="false" Priority="21" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis" /> <w:LsdException Locked="false" Priority="31" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference" /> <w:LsdException Locked="false" Priority="32" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Reference" /> <w:LsdException Locked="false" Priority="33" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Book Title" /> <w:LsdException Locked="false" Priority="37" Name="Bibliography" /> <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading" /> </w:LatentStyles> </xml><![endif]--> <!--[if gte mso 10]><br />
<mce:style><!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-qformat:yes; 	mso-style-parent:""; 	mso-padding-alt:0cm 5.4pt 0cm 5.4pt; 	mso-para-margin-top:0cm; 	mso-para-margin-right:0cm; 	mso-para-margin-bottom:10.0pt; 	mso-para-margin-left:0cm; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi; 	mso-fareast-language:EN-US;} --></p>
<p><!--[endif]--></p>
<p class="Style1">Web gallery built in flash to produce a coverflow like component.<br />
This is an updated implementation of the popular coverflow way of display images. With the release of flash 10 with new 3D capabilities, this allows for a much easier and fast implantation of this popular web component.</p>
<p class="Style1"><img class="aligncenter size-full wp-image-152" title="image_cf1" src="http://lincity.co.uk/blog/wp-content/uploads/image_cf1.jpg" alt="image_cf1" width="550" height="268" /></p>
<p class="Style1">File Main.AS</p>
<pre>package {</pre>
<pre>    ////////////////////////////////////////////</pre>
<pre>    // IMPORTS</pre>
<pre>    ////////////////////////////////////////////</pre>
<pre>    //import flash.utils.*;</pre>
<pre>    //import flash.media.*;</pre>
<pre>    import flash.display.*;</pre>
<pre>    import flash.events.*;</pre>
<pre>    //import flash.net.*;</pre>
<pre>    //import flash.text.*;</pre>
<pre>    public class Main extends Sprite {</pre>
<pre>        ////////////////////////////////////////////</pre>
<pre>        // VARIABLES</pre>
<pre>        ////////////////////////////////////////////</pre>
<pre>        private var coverflow:Coverflow;</pre>
<pre>        ////////////////////////////////////////////</pre>
<pre>        // CONSTRUCTOR - INITIAL ACTIONS</pre>
<pre>        ////////////////////////////////////////////</pre>
<pre>        public function Main() {</pre>
<pre>            setupStage();</pre>
<pre>            //Resize Listener</pre>
<pre>            stage.addEventListener(Event.RESIZE, resizeHandler);</pre>
<pre>            resizeMe();</pre>
<pre>            init();</pre>
<pre>        }</pre>
<pre>        ////////////////////////////////////////////</pre>
<pre>        // FUNCTIONS</pre>
<pre>        ////////////////////////////////////////////</pre>
<pre>        public function setupStage():void {</pre>
<pre>            stage.quality = StageQuality.HIGH;</pre>
<pre>            stage.scaleMode = StageScaleMode.NO_SCALE;</pre>
<pre>            stage.align = StageAlign.TOP_LEFT;</pre>
<pre>        }</pre>
<pre>        //Handles Resizing the Image</pre>
<pre>        private function resizeHandler(event:Event):void {</pre>
<pre>            resizeMe();</pre>
<pre>        }</pre>
<pre>        private function resizeMe():void {</pre>
<pre>            //No Resizing for This</pre>
<pre>        }</pre>
<pre>        private function init():void {</pre>
<pre>            coverflow = new Coverflow(stage.stageWidth, stage.stageHeight, stage);</pre>
<pre>            addChild(coverflow);</pre>
<pre>        }</pre>
<pre>    }</pre>
<pre>}</pre>
<p>File Coverflow.AS</p>
<pre>
package {

	////////////////////////////////////////////
	// IMPORTS
	////////////////////////////////////////////

	import flash.display.Sprite;
	import flash.display.BitmapData;
	import flash.display.Bitmap;
	import flash.display.GradientType;
	import flash.display.Graphics;
	import flash.display.Shape;
	import flash.display.MovieClip;
	import flash.display.BlendMode;
	import flash.display.Loader;
	import flash.events.Event;
	import flash.events.KeyboardEvent;
	import flash.events.MouseEvent;
	import flash.events.IOErrorEvent;
	import flash.geom.Matrix;
	import flash.geom.Rectangle;
	import flash.geom.ColorTransform;
	import flash.net.URLRequest;
	import flash.net.URLLoader;
	import flash.net.navigateToURL;
	import flash.display.Stage;
	import flash.utils.setTimeout;

	//TweenLite - Tweening Engine - SOURCE: http://blog.greensock.com/tweenliteas3/
	import com.greensock.*;
	import com.greensock.easing.*;

	public class Coverflow extends Sprite {

		////////////////////////////////////////////
		// VARIABLES
		////////////////////////////////////////////

		// size of the stage
		private var sw:Number;
		private var sh:Number;

		// padding between each cover, can be customed via xml
		private var coverflowSpacing:Number=30;

		// transition time for movement
		private var transitionTime:Number=0.75;

		// the center of the stage
		private var centerX:Number;
		private var centerY:Number;

		// store each image cover's instance
		private var coverArray:Array=new Array();

		// title of each image
		private var coverLabel:CoverflowTitle = new CoverflowTitle();

		// the slider under the image cover
		private var coverSlider:Scrollbar;

		// how many image covers
		private var coverflowItemsTotal:Number;

		// how to open the link
		private var _target:String;

		// size of the image cover
		private var coverflowImageWidth:Number;

		private var coverflowImageHeight:Number;

		//Holds the objects in the data array
		private var _data:Array = new Array();

		// the y position of the item's title
		private var coverLabelPositionY:Number;

		//Z Position of Current CoverflowItem
		private var centerCoverflowZPosition:Number=-125;

		// display the middle of the cover or not
		private var startIndexInCenter:Boolean=true;

		// which cover to display in the beginning
		private var startIndex:Number=0;

		// the slide's Y position
		private var coverSlidePositionY:Number;

		//Holder for current CoverflowItem
		private var _currentCover:Number;

		//CoverflowItem Container
		private var coverflowItemContainer:Sprite = new Sprite();

		//XML Loading
		private var coverflowXMLLoader:URLLoader;

		//XML
		private var coverflowXML:XML;

		// the image cover's white border padding
		private var padding:Number=4;

		// stage reference
		private var _stage:Stage;

		//reflection
		private var reflection:Reflect;

		//Reflection Properties
		private var reflectionAlpha:Number;

		private var reflectionRatio:Number;

		private var reflectionDistance:Number;

		private var reflectionUpdateTime:Number;

		private var reflectionDropoff:Number;

		////////////////////////////////////////////
		// CONSTRUCTOR - INITIAL ACTIONS
		////////////////////////////////////////////
		public function Coverflow(_width:Number, _height:Number, __stage:Stage = null):void {
			_stage=__stage;
			sw=_width;
			sh=_height;
			centerX=_width&gt;&gt;1;
			centerY=(_height&gt;&gt;1) - 20;
			loadXML();

			if (_stage) {
				_stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
			}
		}
		////////////////////////////////////////////
		// FUNCTIONS
		////////////////////////////////////////////

		private function keyDownHandler(e:KeyboardEvent):void {
			if (e.keyCode==37||e.keyCode==74) {
				clickPre();
			}
			if (e.keyCode==39||e.keyCode==75) {
				clickNext();
			}
			// 72 stand for "H" key, 191 stand for "?" key
			if (e.keyCode==72||e.keyCode==191) {

			}
		}

		// display the previous image
		private function clickPre(e:Event=null):void {
			_currentCover--;
			if (_currentCover&lt;0) {
				_currentCover=coverflowItemsTotal-1;
			}
			coverSlider.value=_currentCover;
			gotoCoverflowItem(_currentCover);
		}

		// display the next image
		private function clickNext(e:Event=null):void {
			_currentCover++;
			if (_currentCover&gt;coverflowItemsTotal-1) {
				_currentCover=0;
			}
			coverSlider.value=_currentCover;
			gotoCoverflowItem(_currentCover);
		}

		// loading the XML
		private function loadXML():void {
			// loading the cover xml here
			coverflowXMLLoader = new URLLoader();
			coverflowXMLLoader.load(new URLRequest("xml/data.xml"));
			coverflowXMLLoader.addEventListener(Event.COMPLETE, coverflowXMLLoader_Complete);
			coverflowXMLLoader.addEventListener(IOErrorEvent.IO_ERROR, coverflowXMLLoader_IOError);

		}

		// parse the XML
		private function coverflowXMLLoader_Complete(e:Event):void {
			coverflowXML=new XML(e.target.data);
			coverflowItemsTotal=coverflowXML.cover.length();
			coverflowSpacing=Number(coverflowXML.@coverflowSpacing);
			coverflowImageWidth=Number(coverflowXML.@width);
			coverflowImageHeight=Number(coverflowXML.@height);
			coverLabelPositionY=Number(coverflowXML.@coverLabelPositionY);
			coverSlidePositionY=Number(coverflowXML.@coverSlidePositionY);
			transitionTime=Number(coverflowXML.@transitionTime);
			centerCoverflowZPosition=Number(coverflowXML.@centerCoverflowZPosition);

			//Reflection Attributes
			reflectionAlpha=Number(coverflowXML.@reflectionAlpha);
			reflectionRatio=Number(coverflowXML.@reflectionRatio);
			reflectionDistance=Number(coverflowXML.@reflectionDistance);
			reflectionUpdateTime=Number(coverflowXML.@reflectionUpdateTime);
			reflectionDropoff=Number(coverflowXML.@reflectionDropoff);

			startIndex=Number(coverflowXML.@startIndex);
			startIndexInCenter = (coverflowXML.@startIndexInCenter.toLowerCase().toString()=="yes");
			_target=coverflowXML.@target.toString();

			for (var i=0; i&lt;coverflowItemsTotal; i++) {

				//Make An Object To Hold Values
				var _obj:Object = new Object();

				//Set Values To Object from XML for each CoverflowItem
				_obj.image = (coverflowXML.cover[i].@img.toString());
				_obj.title = (coverflowXML.cover[i].@title.toString());
				_obj.link = (coverflowXML.cover[i].@link.toString());
				_data[i] = _obj;

			}
			loadCover();
		}

		private function coverflowXMLLoader_IOError(event:IOErrorEvent):void {
			trace("Coverflow XML Load Error: "+ event);
		}

		// load the image cover when xml is loaded
		private function loadCover():void {

			for (var i:int = 0; i &lt; coverflowItemsTotal; i++) {
				var cover:Sprite=createCover(i,_data[i].image);
				coverArray[i]=cover;
				cover.y=centerY;
				cover.z=0;
				coverflowItemContainer.addChild(cover);
			}

			if (startIndexInCenter) {
				startIndex=coverArray.length&gt;&gt;1;
				gotoCoverflowItem(startIndex);

			} else {

				gotoCoverflowItem(startIndex);

			}
			_currentCover=startIndex;
			coverSlider=new Scrollbar(coverflowItemsTotal,_stage);
			coverSlider.value=startIndex;
			coverSlider.x = (_stage.stageWidth/2) - (coverSlider.width/2);
			coverSlider.y=_stage.stageHeight-40;
			coverSlider.addEventListener("UPDATE", coverSlider_Update);
			coverSlider.addEventListener("PREVIOUS", coverSlider_Previous);
			coverSlider.addEventListener("NEXT", coverSlider_Next);
			addChild(coverSlider);

			//coverLabel.x = (sw - coverLabel.width)&gt;&gt;1;
			coverLabel.x = (_stage.stageWidth/2) - (coverLabel.width/2);
			coverLabel.y=coverLabelPositionY;
			addChild(coverLabel);

			addChild(coverSlider);
			addChild(coverLabel);

		}

		private function coverSlider_Update(e:Event):void {
			var value:Number=(coverSlider.value);
			gotoCoverflowItem(value);
			e.stopPropagation();
		}

		private function coverSlider_Previous(e:Event):void {
			clickPre();
		}

		private function coverSlider_Next(e:Event):void {
			clickNext();
		}

		// move to a certain cover via number
		private function gotoCoverflowItem(n:int):void {
			_currentCover=n;
			reOrderCover(n);
			if (coverSlider) {
				coverSlider.value=n;
			}
		}

		private function cover_Selected(event:CoverflowItemEvent):void {

			var currentCover:uint=event.data.id;

			if (coverArray[currentCover].rotationY==0) {
				try {
					// open the link if user click the cover in the middle again
					if (_data[currentCover].link!="") {
						navigateToURL(new URLRequest(_data[currentCover].link), _target);
					}

				} catch (e:Error) {
					//
				}

			} else {
				gotoCoverflowItem(currentCover);

			}

		}

		// change each cover's position and rotation
		private function reOrderCover(currentCover:uint):void {
			for (var i:uint = 0, len:uint = coverArray.length; i &lt; len; i++) {
				var cover:Sprite=coverArray[i];

				if (i&lt;currentCover) {
					//Left Side
					TweenLite.to(cover, transitionTime, {x:(centerX - (currentCover - i) * coverflowSpacing - coverflowImageWidth/2), z:(coverflowImageWidth/2), rotationY:-65});
				} else if (i &gt; currentCover) {
					//Right Side
					TweenLite.to(cover, transitionTime, {x:(centerX + (i - currentCover) * coverflowSpacing + coverflowImageWidth/2), z:(coverflowImageWidth/2), rotationY:65});
				} else {
					//Center Coverflow
					TweenLite.to(cover, transitionTime, {x:centerX, z:centerCoverflowZPosition, rotationY:0});

					//Label Handling
					coverLabel._text.text=_data[i].title;
					coverLabel.alpha=0;
					TweenLite.to(coverLabel, 0.75, {alpha:1,delay:0.2});

				}
			}
			for (i = 0; i &lt; currentCover; i++) {
				addChild(coverArray[i]);
			}
			for (i = coverArray.length - 1; i &gt; currentCover; i--) {
				addChild(coverArray[i]);
			}

			addChild(coverArray[currentCover]);
			if (coverSlider) {
				addChild(coverSlider);
				addChild(coverLabel);
			}
		}

		//Create CoverflowItem and Set Data To It
		private function createCover(num:uint, url:String):Sprite {

			//Setup Data
			var _data:Object = new Object();
			_data.id=num;

			//Create CoverflowItem
			var cover:CoverflowItem=new CoverflowItem(_data);

			//Listen for Click
			cover.addEventListener(CoverflowItemEvent.COVERFLOWITEM_SELECTED, cover_Selected);

			//Set Some Values
			cover.name=num.toString();
			cover.image=url;
			cover.padding=padding;
			cover.imageWidth=coverflowImageWidth;
			cover.imageHeight=coverflowImageHeight;
			cover.setReflection(reflectionAlpha, reflectionRatio, reflectionDistance, reflectionUpdateTime, reflectionDropoff);

			//Put CoverflowItem in Sprite Container
			var coverItem:Sprite = new Sprite();
			cover.x=- coverflowImageWidth/2-padding;
			cover.y=- coverflowImageHeight/2-padding;
			coverItem.addChild(cover);
			coverItem.name=num.toString();

			return coverItem;
		}

	}
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://lincity.co.uk/blog/?feed=rss2&amp;p=142</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Start with Action Script 3.</title>
		<link>http://lincity.co.uk/blog/?p=135</link>
		<comments>http://lincity.co.uk/blog/?p=135#comments</comments>
		<pubDate>Fri, 13 Nov 2009 09:25:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://lincity.co.uk/blog/?p=135</guid>
		<description><![CDATA[

Flash is a popular development tool for now a day webdesign and become the standard tools on web development.
As you are a webdesigner, you should learn it or you already learn it. But, since the introduce o f Actionscript 3.0, some people may stuck with the new programming language because it is well structured and [...]]]></description>
			<content:encoded><![CDATA[<div class="snap_preview">
<p><img class="alignnone size-full wp-image-2757" title="as31" src="http://flashenabled.files.wordpress.com/2009/03/as31.jpg?w=320&amp;h=149" alt="as31" width="320" height="149" /></p>
<p>Flash is a popular development tool for now a day webdesign and become the standard tools on web development.</p>
<p>As you are a webdesigner, you should learn it or you already learn it. But, since the introduce o f Actionscript 3.0, some people may stuck with the new programming language because it is well structured and more strict. You need more effort to start learning and master it.</p>
<p>But ActionScript 3.0 is a must for many jobs now. So,  i Introduce some resource which help you to get start with Action Script 3.0.</p>
<p><strong>Ntt.cc – Beginning Action Script 3.0</strong></p>
<p><a href="http://ntt.cc/2009/03/12/beginning-actionscript-3-build-the-first-actionscript-project.html" target="_blank">Build the first ActionScript project</a><br />
<a href="http://ntt.cc/2009/03/13/beginning-actionscript-3-variables.html" target="_blank">Variables</a><br />
<a href="http://ntt.cc/2009/03/15/beginning-actionscript-3-data-type.html" target="_blank">Data type</a><br />
<a href="http://ntt.cc/2009/03/16/beginning-actionscript-3-literal-and-constant.html" target="_blank">Literal and Constant</a></p>
<pre><strong>Flash Speaks ActionScript</strong></pre>
<p><a href="http://flashspeaksactionscript.com/moving-from-as2-to-as3-handling-depths/" target="_blank">Moving From AS2 to AS3: Handling Depths</a></p>
<p><a href="http://www.a-sfug.com/instance-names-and-code-hinting-tips-tricks/" target="_blank">Instance names and code hinting – Tips &amp; Tricks</a></p>
<p><strong> <a href="http://www.mikechambers.com/blog/2009/01/26/actionscript-3-reference-for-iphone/" target="_blank">ActionScript 3 Reference for iPhone</a></strong></p>
<p>I will contiune to update this post for more resources.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://lincity.co.uk/blog/?feed=rss2&amp;p=135</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET Database connection strings in web.config</title>
		<link>http://lincity.co.uk/blog/?p=110</link>
		<comments>http://lincity.co.uk/blog/?p=110#comments</comments>
		<pubDate>Sun, 17 May 2009 20:54:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[VB]]></category>

		<guid isPermaLink="false">http://lincity.co.uk/blog/?p=110</guid>
		<description><![CDATA[The Connection string contains sensitive data like username, password, IP address of the server. When we place this sensitive data in an .aspx file for a web application or visual basic or C# files, we run the risk of exposing this data to a hacker.
So, we place this code in the web configuration file. Configuration [...]]]></description>
			<content:encoded><![CDATA[<p>The Connection string contains sensitive data like username, password, IP address of the server. When we place this sensitive data in an .aspx file for a web application or visual basic or C# files, we run the risk of exposing this data to a hacker.</p>
<p>So, we place this code in the web configuration file. Configuration files are used to store information about application settings.</p>
<p>These files are also referred to as Application Configuration Files and provide security to the data contained in them.</p>
<p>We place the connection string in App.config file for windows applications and web.config file for web applications.<br />
-web.config is created automatically by VS.NET when you create any web project.</p>
<p>-When you compile the web application, web.config is NOT renamed or copied to the BIN folder.</p>
<p>-web.config has several default entries in it to support web/IIS configuration &amp; security.</p>
<p>-You can add the &lt;appSettings&gt;section in the web.config and add your key/value pairs in that section.</p>
<p>-You can have separate web.config files for each directory in your web application, in addition to the one in the root. For each web page, by default, system will look for a web.config in the same folder as the page and if not found, then looks in the parent folder. The web.config file with the connection string will have the following content.</p>
<pre style="background-color: #e9e9e9;">  &lt; ?xml version="1.0"?&gt;
  &lt; configuration&gt;
	&lt; appSettings&gt;
		&lt; add key="DatabasePath"
		  value="server=localhost;
		database=FinAccounting;
		Integrated Security=true;"/&gt;
	&lt; /appSettings&gt;
  &lt; /configuration&gt;</pre>
<p>For the web.config file to be read, place the following code in your web application as shown below.</p>
<pre style="background-color: #e9e9e9;">  Imports System.Configuration
  Imports System.Data.SqlClient

  Partial Class _Default
    Inherits System.Web.UI.Page

    Dim dbpath As String
	 = ConfigurationSettings.AppSettings("DatabasePath")
    Dim str_sql_user_select As String
	 = "SELECT * FROM AccountsTable"
    Dim comUserSelect As SqlCommand
    Dim myreader As SqlDataReader

    Protected Sub Page_Load
	(ByVal sender As Object, ByVal e As System.EventArgs)
	  Handles Me.Load

        Dim myConnection As SqlConnection
		 = New SqlConnection(dbpath)
        comUserSelect = New
		 SqlCommand(str_sql_user_select, myConnection)
        TextBox1.Text = ""
        TextBox2.Text = ""
        myConnection.Open()
        myreader = comUserSelect.ExecuteReader
        If (myreader.Read = True) Then
            TextBox1.Text = myreader(0)
            TextBox2.Text = myreader(1)
        Else
            MsgBox("You have reached eof")
        End If

    End Sub
  End Class</pre>
]]></content:encoded>
			<wfw:commentRss>http://lincity.co.uk/blog/?feed=rss2&amp;p=110</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows 7</title>
		<link>http://lincity.co.uk/blog/?p=92</link>
		<comments>http://lincity.co.uk/blog/?p=92#comments</comments>
		<pubDate>Fri, 15 May 2009 14:28:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://lincity.co.uk/blog/?p=92</guid>
		<description><![CDATA[Windows 7 is the updated version of the Vista operating system from Microsoft. It was built around feedback from users and has been developed to work with touch screen controls, among other features.
However, because Microsoft isn&#8217;t providing technical support for the Beta, I strongly recommend that only experienced computer users sign up. How experienced? At [...]]]></description>
			<content:encoded><![CDATA[<p style="line-height: 12.9pt;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 9pt;">Windows 7 is the updated version of the Vista operating system from Microsoft. It was built around feedback from users and has been developed to work with touch screen controls, among other features.</span></p>
<p style="line-height: 12.9pt;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 9pt;">However, because Microsoft isn&#8217;t providing technical support for the Beta, I strongly recommend that only experienced computer users sign up. How experienced? At minimum, you should be comfortable backing up a computer, formatting a hard drive, burning an ISO file to DVD, and installing an operating system from scratch. You should also be comfortable troubleshooting problems on your own. If you&#8217;ve not used beta software before, please read the warning messages and make sure you know what you&#8217;re getting into.</span></p>
<p style="line-height: 12.9pt;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 9pt;">Windows release candidate is available free to everyone form<a class="aligncenter" href="http://www.microsoft.com/windows/windows-7/download.aspx" target="_blank"> http://www.microsoft.com/windows/windows-7/download.aspx</a><br />
and is licensed including a <strong>free KEY number,</strong> which will continue to work until 1st July 2010. After which you will have to remove it.</span></p>
<p style="text-align: justify; line-height: 12.9pt;"><strong><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 9pt;">PLEASE NOTE at this time of writing, there is no easy upgrade from the free RC1 to the full purchaced version of windows 7.</span></strong></p>
<p style="line-height: 12.9pt;"><strong><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 9pt;"><br />
</span><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 9pt;">You will have to do a full reinstall sometime before July 2010.</span></strong></p>
<p style="line-height: 12.9pt;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 9pt;">Windows 7 provides an improved task bar and full-screen previews. Jump Lists put the documents you want handy and the ones you&#8217;ve used recently a couple clicks away. Desktop enhancements simplify how you work with the windows on your desktop. You&#8217;ll have more intuitive ways to open, close, resize, and arrange them. Introduced with Windows Vista, Windows Search helps you find virtually anything on your PC quickly and easily. Windows 7 also makes search results more relevant and easier to understand. Available now, Internet Explorer 8 helps you do what you want online, faster. With Windows 7, you&#8217;ll use a single Devices and Printers screen to connect, manage, and use whatever printers, phones, and other devices you have on-hand.</span></p>
<p class="small" style="text-align: center; line-height: 12.9pt; margin: auto 0cm;" align="center"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 9pt;">Crisp, clean, speedy, and highly-usable: It&#8217;s the Windows 7 release candidate!<br />
This is possibly the best release of windows ever.</span></strong></p>
<p class="small" style="text-align: center; line-height: 12.9pt; margin: auto 0cm;" align="center"><strong style="mso-bidi-font-weight: normal;"></strong></p>
<p style="line-height: 12.9pt;"> </p>
<p style="line-height: 12.9pt;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 9pt;"><img class="alignnone size-medium wp-image-128" title="Windows 7" src="http://lincity.co.uk/blog/wp-content/uploads/win7_rc_review_03-300x187.jpg" alt="Windows 7" width="300" height="187" /></span></p>
<p style="line-height: 12.9pt;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 9pt;">In general terms, we can already see major improvements. Looked at across the span of these two preceding releases, the Windows 7 RC is a shining star of performance, usability, stability, and maturity. Yes, there are teething pains, bits of inconsistency that will drive purists nuts (for example, Microsoft can&#8217;t seem to settle on a single spelling or capitalization scheme for the HomeGroup feature).</span></p>
<p style="line-height: 12.9pt;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 9pt;">But Windows 7, in release candidate guise, is already a towering achievement that casts Windows Vista immediately in its shadow. I&#8217;ve often opined that the true measure of any OS is how painful it renders using its predecessor. And now, several long months after moving to Windows 7 full time, I can honestly state that Windows 7 makes Windows Vista look like a bad dream by comparison. Among many other things, Vista is sluggish compared to 7, and it doesn&#8217;t remember window sizes and customization styles. (Windows XP, which lacks so many Vista/7-era features that it&#8217;s painful to even discuss, fares even worse by comparison, except in the performance category.)</span></p>
<p style="text-align: center; line-height: 12.9pt;" align="center"> </p>
<p style="line-height: 12.9pt;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 9pt;">So here we are on the cusp of a new Windows. A Windows that is faster than its predecessor and runs just fine on low-end netbook hardware. It&#8217;s more compatible with both hardware and software, especially when you factor in the exciting new XP Mode feature. It&#8217;s more secure and reliable. And, most important from an end user perspective, it&#8217;s more <em>usable</em>. Now, more than ever, it seems like Microsoft has examined every single nhook and cranny in this OS and has tweaked and gussied up virtually all of it. Some of the user experience changes, like the new taskbar, are immediately obvious on first boot, while other more minor changes simply become apparent over time in the using. There&#8217;s a happy change around every corner, it seems.</span></p>
<p style="text-align: center; line-height: 12.9pt;" align="center"> </p>
<p style="line-height: 12.9pt;"><span style="font-family: &quot;Georgia&quot;,&quot;serif&quot;; color: black; font-size: 9pt;">This, then, is the Windows 7 release candidate. And while Microsoft continues to promise only that it will ship Windows 7 sometime by early 2010, I&#8217;m here to tell you that Microsoft&#8217;s public schedule is almost comically conservative. The Windows 7 RC could literally ship as the final version of the product. There are mitigating factors that will prevent that from happening&#8211;persistent rumors of a new UI skin among them&#8211; </span></p>
]]></content:encoded>
			<wfw:commentRss>http://lincity.co.uk/blog/?feed=rss2&amp;p=92</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Login and password hashing.</title>
		<link>http://lincity.co.uk/blog/?p=19</link>
		<comments>http://lincity.co.uk/blog/?p=19#comments</comments>
		<pubDate>Fri, 13 Feb 2009 17:09:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Uni Work]]></category>

		<guid isPermaLink="false">http://lincity.co.uk/blog/?p=19</guid>
		<description><![CDATA[PHP Login and password hashing.
If you build websites that require users to register it’s your responsibility to keep their passwords safe. And if you’re storing the passwords in plain text then you’re not doing your job properly. What happens if your database is stolen? It’s not just your site that is compromised. Since most users [...]]]></description>
			<content:encoded><![CDATA[<h2>PHP Login and password hashing.</h2>
<p>If you build websites that require users to register it’s your responsibility to keep their passwords safe. And if you’re storing the passwords in plain text then you’re not doing your job properly. What happens if your database is stolen? It’s not just your site that is compromised. Since most users use the same password on multiple sites, all those sites have also been compromised.</p>
<p>No data is entirely secure, and if anyone else has access to your webserver (the company managing the server for you?) or your database (the company storing the backups?) then you don’t have total control over the security anyway. So there’s always a chance your database could be stolen. So, the simple rule is to hash your passwords.</p>
<h2>Hashing</h2>
<p>A hash is a string derived from the original password via a one-way algorithm. In other words, it’s easy to create the hash from the original, but harder (when used for security, ideally impossible) to create the original from the hash. You store the hash in the database, and when the user signs-in you hash the password they sign-in with and compare it to the hash in the database. Something like this</p>
<pre class="code">$userPasswordHash == sha1( $_POST['password'] )</pre>
<p>That way, you never store the user’s password.</p>
<p>There are a number of hashing algorithms in PHP, of which md5 and sha1 are the most commonly used. Unfortunately, neither is as secure as they were once thought to be. It would be better to use a more secure hash, and if you have the Hash engine in your PHP installation (included by default since PHP 5.1.2) then you have access to many more algorithms. So a better example would be</p>
<h3>The Code Bit</h3>
<pre class="code"> $userPassWordhash == hash( 'whirlpool', $_POST['password'] )</pre>
<p>To see a full lis of hashing algorithms in PHP use this code:</p>
<pre>&lt;?PHP
$algos = hash_algos();
$word="hash me!";

foreach($algos as $algo)
{
    echo "Algorithm: ".$algo.": "."&lt;br&gt;";
    echo "Hash: ".hash($algo, $word)."&lt;br&gt;";
    echo "String Length: ".strlen(hash($algo, $word))."&lt;br&gt;";
    echo "&lt;hr&gt;";
}
?&gt;</pre>
<h4>Sample output:</h4>
<pre>Algorithm: md5:
Hash: 88a568e86f4ffbb458bb4ebfe3df6e2e
String Length: 32</pre>
<pre>Algorithm: sha1:
Hash: 0195580447ce25847a2954422de4b5f7d01bc143
String Length: 40</pre>
<pre>Algorithm: whirlpool:
Hash: a4718a7a9ec6eb2bb8b4813961fd8ab0104a23a3f3ec677
4117dd67b8665a27eaea998bc85b69cfb74ac2cdb49a92b
f36d9beb22ece6fd934b315e40267195d7
String Length: 128</pre>
<h3>How to use the in checking password script:</h3>
<pre>&lt;?php
session_start();
//connect to server and select database
//Host , User, Password, Database Name
$mysqli = mysqli_connect("localhost", "user", "dbpassword", "dbname");

$username = stripslashes(trim($_POST["username"]));
$password = stripslashes(hash('whirlpool',$_POST[password]));

//create and issue the query
$sql = "SELECT username FROM users WHERE username = '".$username."' AND password = '".$password."'";
$result = mysqli_query($mysqli, $sql) or die(mysqli_error($mysqli));
.
.
.
?&gt;</pre>
<h2>Rainbow tables</h2>
<p>But there’s another problem. Once your database is stolen, the thief has plenty of time to crack the passwords using a simple <a href="http://www.codinghorror.com/blog/archives/000949.html">Rainbow Table attack</a>. This involves creating a large selection of hashes based on likely passwords (e.g. every word in the dictionary) and then comparing the hashes with the hashes in your database. Within an day or so, half the passwords in your database will probably have been cracked.</p>
<p>To prevent this you should salt each password by adding a random string to it (called a salt or nonce). The time consuming part of a rainbow table attack is building the dictionary of hashes. Adding a random salt to the password means the thief has to build a whole new dictionary of hashes for each salt, making a rainbow table attack too time consuming to be viable. Each password should have a different salt, and the salt doesn’t even need to be secret.</p>
<h3>The Code bit</h3>
<p>The code below demonstrate hone way you can add salt to a password hash. Copy code between &lt;?php &#8230; ?&gt; tags to paste in to a new php file to try.</p>
<pre>&lt;?php
// get a new salt - 8 hexadecimal characters long
// current PHP installations should not exceed 8 characters
// on dechex( mt_rand() )
// but we future proof it anyway with substr()
function getPasswordSalt()
{
    return substr( str_pad( dechex( mt_rand() ), 8, '0', STR_PAD_LEFT ), -8 );
}
// calculate the hash from a salt and a password
function getSaltedPasswordHash( $salt, $password )
{
    return $salt . ( hash( 'whirlpool', $salt.$password.$salt ) );
}

$salt = getPasswordSalt();
$password="Hash me!";
$standardHash = hash('whirlpool',$password);
$saltedHash=getSaltedPasswordHash( $salt, $password );

echo "Password: ".$password."&lt;br/&gt;";
echo "Salt: ".$salt."&lt;br/&gt;";

echo "Standard Hash: ".$standardHash."&lt;br/&gt;";
echo " Salted Hash : ".$saltedHash."&lt;br/&gt;";

?&gt;</pre>
<h3>So, for secure passwords use</h3>
<pre class="code">// get a new salt - 8 hexadecimal characters long
// current PHP installations should not exceed 8 characters
// on dechex( mt_rand() )
// but we future proof it anyway with substr()
function getPasswordSalt()
{
    return substr( str_pad( dechex( mt_rand() ), 8, '0', STR_PAD_LEFT ), -8 );
}

// calculate the hash from a salt and a password
function getPasswordHash( $salt, $password )
{
    return $salt . ( hash( 'whirlpool', $salt . $password ) );
}

// compare a password to a hash
function comparePassword( $password, $hash )
{
    $salt = substr( $hash, 0, 8 );
    return $hash == getPasswordHash( $salt, $password );
}

// get a new hash for a password
$hash = getPasswordHash( getPasswordSalt(), $password );</pre>
<p>You don’t have to attach the salt to the hash, you can instead store them separately within the database, but I like keeping them together in a single string. Equally, the salt needn’t be in hexadecimal, but I like the symmetry with the hexadecimal hash.</p>
<p>Finally, <a href="http://www.matasano.com/log/958/enough-with-the-rainbow-tables-what-you-need-to-know-about-secure-password-schemes/">as Thomas Ptacek points out</a>, you don’t want the fastest hash algorithm in the world for this &#8211; a fast algorithm is more useful to an attacker than it is to you.</p>
]]></content:encoded>
			<wfw:commentRss>http://lincity.co.uk/blog/?feed=rss2&amp;p=19</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Books</title>
		<link>http://lincity.co.uk/blog/?p=68</link>
		<comments>http://lincity.co.uk/blog/?p=68#comments</comments>
		<pubDate>Tue, 10 Jun 2008 10:34:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Books]]></category>

		<guid isPermaLink="false">http://lincity.co.uk/blog/?p=68</guid>
		<description><![CDATA[Books I have read and own.






]]></description>
			<content:encoded><![CDATA[<h2>Books I have read and own.</h2>
<p><img class="alignnone size-full wp-image-71" title="books-08300" src="http://lincity.co.uk/blog/wp-content/uploads/books-08300.jpg" alt="books-08300" width="561" height="337" /></p>
<p><img class="alignnone size-medium wp-image-67" title="book-08297" src="http://lincity.co.uk/blog/wp-content/uploads/book-08297-270x300.jpg" alt="book-08297" width="270" height="300" /><img class="alignnone size-medium wp-image-66" title="book-08294" src="http://lincity.co.uk/blog/wp-content/uploads/book-08294-300x299.jpg" alt="book-08294" width="256" height="259" /></p>
<p><img class="alignnone size-medium wp-image-63" title="book-08288" src="http://lincity.co.uk/blog/wp-content/uploads/book-08288-258x300.jpg" alt="book-08288" width="258" height="300" /><img class="alignnone size-medium wp-image-62" title="book-08287" src="http://lincity.co.uk/blog/wp-content/uploads/book-08287-259x300.jpg" alt="book-08287" width="249" height="291" /></p>
<p><img class="alignnone size-medium wp-image-65" title="book-08293" src="http://lincity.co.uk/blog/wp-content/uploads/book-08293-278x300.jpg" alt="book-08293" width="278" height="300" /><img class="alignnone size-medium wp-image-64" title="book-08289" src="http://lincity.co.uk/blog/wp-content/uploads/book-08289-270x300.jpg" alt="book-08289" width="244" height="275" /></p>
<p><img class="alignnone size-medium wp-image-61" title="book-08286" src="http://lincity.co.uk/blog/wp-content/uploads/book-08286-267x300.jpg" alt="book-08286" width="253" height="281" /><img class="alignnone size-medium wp-image-60" title="book-08283" src="http://lincity.co.uk/blog/wp-content/uploads/book-08283-258x300.jpg" alt="book-08283" width="258" height="300" /></p>
<p><img class="alignnone size-medium wp-image-59" title="book-08280" src="http://lincity.co.uk/blog/wp-content/uploads/book-08280-253x300.jpg" alt="book-08280" width="253" height="300" /></p>
]]></content:encoded>
			<wfw:commentRss>http://lincity.co.uk/blog/?feed=rss2&amp;p=68</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10 Second film assigment</title>
		<link>http://lincity.co.uk/blog/?p=75</link>
		<comments>http://lincity.co.uk/blog/?p=75#comments</comments>
		<pubDate>Sun, 06 Jan 2008 13:26:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Creative-Tech]]></category>
		<category><![CDATA[Uni Work]]></category>

		<guid isPermaLink="false">http://lincity.co.uk/blog/?p=75</guid>
		<description><![CDATA[Speed

]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.lincity.co.uk/blog/wp-content/uploads/speed16.mpg">Speed</a></p>
<p><object classid="clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b" width="400" height="300" codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"><param name="loop" value="true" /><param name="src" value="www.lincity.co.uk/blog/wp-content/uploads/speed16.mpg" /><param name="bgcolor" value="#000000" /><param name="vspace" value="400" /><param name="hspace" value="300" /><embed type="video/quicktime" width="400" height="300" src="www.lincity.co.uk/blog/wp-content/uploads/speed16.mpg" hspace="300" vspace="400" bgcolor="#000000" loop="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://lincity.co.uk/blog/?feed=rss2&amp;p=75</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.lincity.co.uk/blog/wp-content/uploads/speed16.mpg" length="2284492" type="video/mpeg" />
		</item>
		<item>
		<title></title>
		<link>http://lincity.co.uk/blog/?p=83</link>
		<comments>http://lincity.co.uk/blog/?p=83#comments</comments>
		<pubDate>Wed, 14 Nov 2007 15:41:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Creative-Tech]]></category>
		<category><![CDATA[Photos]]></category>
		<category><![CDATA[Uni Work]]></category>

		<guid isPermaLink="false">http://lincity.co.uk/blog/?p=83</guid>
		<description><![CDATA[Photos

]]></description>
			<content:encoded><![CDATA[<h2>Photos</h2>
<h2>
<a href='http://lincity.co.uk/blog/?attachment_id=81' title='pic'><img width="150" height="150" src="http://lincity.co.uk/blog/wp-content/uploads/pic-150x150.jpg" class="attachment-thumbnail" alt="" title="pic" /></a>
<a href='http://lincity.co.uk/blog/?attachment_id=82' title='pic-00729'><img width="150" height="150" src="http://lincity.co.uk/blog/wp-content/uploads/pic-00729-150x150.jpg" class="attachment-thumbnail" alt="" title="pic-00729" /></a>
</h2>
]]></content:encoded>
			<wfw:commentRss>http://lincity.co.uk/blog/?feed=rss2&amp;p=83</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creative Tech Workshops Restoring Photos</title>
		<link>http://lincity.co.uk/blog/?p=12</link>
		<comments>http://lincity.co.uk/blog/?p=12#comments</comments>
		<pubDate>Sun, 28 Oct 2007 15:05:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Creative-Tech]]></category>
		<category><![CDATA[Uni Work]]></category>

		<guid isPermaLink="false">http://lincity.co.uk/blog/?p=12</guid>
		<description><![CDATA[Before and after shots of photo fixes.



 
]]></description>
			<content:encoded><![CDATA[<p>Before and after shots of photo fixes.</p>
<p><img class="alignnone size-full wp-image-46" title="blur-backgound_2up" src="http://lincity.co.uk/blog/wp-content/uploads/blur-backgound_2up.jpg" alt="blur-backgound_2up" width="400" height="472" /></p>
<p><img class="alignnone size-full wp-image-54" title="hue-saturation_done_2up" src="http://lincity.co.uk/blog/wp-content/uploads/hue-saturation_done_2up.jpg" alt="hue-saturation_done_2up" width="400" height="616" /></p>
<p><img class="alignnone size-full wp-image-47" title="color-balance_done_2up" src="http://lincity.co.uk/blog/wp-content/uploads/color-balance_done_2up.jpg" alt="color-balance_done_2up" width="400" height="1088" /></p>
<p> <img class="alignnone size-full wp-image-56" title="repair04_done_2up" src="http://lincity.co.uk/blog/wp-content/uploads/repair04_done_2up.jpg" alt="repair04_done_2up" width="400" height="236" /></p>
]]></content:encoded>
			<wfw:commentRss>http://lincity.co.uk/blog/?feed=rss2&amp;p=12</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
