<?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"
	>

<channel>
	<title>Website Design Liskeard</title>
	<atom:link href="http://www.minimalistics.co.uk/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://www.minimalistics.co.uk/blog</link>
	<description>The designs, findings, inspiration and life of new media designer from Cornwall, UK</description>
	<pubDate>Sun, 29 Jun 2008 07:59:36 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Posh and Cosy Salon Website Idea</title>
		<link>http://www.minimalistics.co.uk/blog/posh-and-cosy-salon-website-idea/</link>
		<comments>http://www.minimalistics.co.uk/blog/posh-and-cosy-salon-website-idea/#comments</comments>
		<pubDate>Sun, 29 Jun 2008 07:58:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Work for Clients]]></category>

		<category><![CDATA[salon website]]></category>

		<guid isPermaLink="false">http://www.minimalistics.co.uk/blog/?p=109</guid>
		<description><![CDATA[Below is one of the most recent design ideas that we came up with for Posh and Cosy&#8217;s new website. The idea was to create a stylish feminine and professional looking design to appeal to its ever growing client base (p.s as you can see its not quite finished).
Click on the image to see a larger [...]]]></description>
			<content:encoded><![CDATA[<p>Below is one of the most recent design ideas that we came up with for Posh and Cosy&#8217;s new website. The idea was to create a stylish feminine and professional looking design to appeal to its ever growing client base (p.s as you can see its not quite finished).</p>
<p>Click on the image to see a larger version.</p>
<p> </p>
<p><a href="http://www.minimalistics.co.uk/blog/wp-content/uploads/2008/06/idea.jpg"><img class="alignnone size-full wp-image-110" title="Posh and Cosy website design" src="http://www.minimalistics.co.uk/blog/wp-content/uploads/2008/06/posh-and-cosy.jpg" alt="" width="456" height="435" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.minimalistics.co.uk/blog/posh-and-cosy-salon-website-idea/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PHP capitalising the first letters of each word in a sentance</title>
		<link>http://www.minimalistics.co.uk/blog/php-capitalising-the-first-letters-of-each-word-in-a-sentance/</link>
		<comments>http://www.minimalistics.co.uk/blog/php-capitalising-the-first-letters-of-each-word-in-a-sentance/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 21:19:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[PHP]]></category>

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

		<category><![CDATA[string manipulation]]></category>

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

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

		<guid isPermaLink="false">http://www.minimalistics.co.uk/blog/?p=108</guid>
		<description><![CDATA[I recently wanted a contact form to convert a form element, in this case someones name to uppercase. For example &#8216;tom peters&#8217; decided to enter his name without any capitals. The desired result would ideally be &#8216;Tom Peters&#8217;.
Using PHP we can convert the form field variable by doing the following:
$personsname= &#34;tom peters&#34;;
$PersonsName = ucwords($personsname); 
echo [...]]]></description>
			<content:encoded><![CDATA[<p>I recently wanted a contact form to convert a form element, in this case someones name to uppercase. For example &#8216;tom peters&#8217; decided to enter his name without any capitals. The desired result would ideally be &#8216;Tom Peters&#8217;.</p>
<p>Using PHP we can convert the form field variable by doing the following:</p>
<p><code>$personsname= &quot;tom peters&quot;;<br />
$PersonsName = ucwords($personsname); </p>
<p>echo &quot;&lt;p&gt;The old string - $personsname &lt;br /&gt;&quot;;<br />
echo &quot;The new string - $PersonsName &lt;/p&gt;&quot;;</code></p>
<p>There are a few more examples that you could experiment with for example:<br />
strtolower(); will convert a string to lowercase.<br />
strtoupper(); will convert a string to uppercase.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.minimalistics.co.uk/blog/php-capitalising-the-first-letters-of-each-word-in-a-sentance/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Falcon Ridge - Holiday Lodges Site Launch</title>
		<link>http://www.minimalistics.co.uk/blog/falcon-ridge-holiday-lodges-site-launch/</link>
		<comments>http://www.minimalistics.co.uk/blog/falcon-ridge-holiday-lodges-site-launch/#comments</comments>
		<pubDate>Sat, 07 Jun 2008 09:15:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Work for Clients]]></category>

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

		<category><![CDATA[falcon ridge development]]></category>

		<category><![CDATA[holiday homes]]></category>

		<category><![CDATA[holiday lodges]]></category>

		<guid isPermaLink="false">http://www.minimalistics.co.uk/blog/?p=101</guid>
		<description><![CDATA[
Today we launched the all new website for the new Falcon Ridge development, a unique development of 15 contemporary lodges at the old Dobwalls Adventure Park site.
The lodge features include:

Double glazing
Floor to ceiling windows in the lounge and bedrooms
Solid timber cladding
Flat screen TV
Fully fitted kitchen
Beautiful bathroom suite
En-suite master bedroom
Engineered oak plank flooring
Recessed halogen lighting
Stainless steel electrical [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.falconridgeliving.co.uk"><img style="float:right; padding:0 0 10px 10px;" title="Falcon Ridge - A website by Minimalistic Designs" src="http://www.minimalistics.co.uk/blog/wp-content/uploads/2008/06/falcon-ridge-small.png" alt="Falcon Ridge - A website by Minimalistic Designs" width="227" height="330" /></a></p>
<p>Today we launched the all new website for the new Falcon Ridge development, a unique development of 15 contemporary lodges at the old Dobwalls Adventure Park site.</p>
<p>The lodge features include:</p>
<ul style="margin-bottom:10px;">
<li>Double glazing</li>
<li>Floor to ceiling windows in the lounge and bedrooms</li>
<li>Solid timber cladding</li>
<li>Flat screen TV</li>
<li>Fully fitted kitchen</li>
<li>Beautiful bathroom suite</li>
<li>En-suite master bedroom</li>
<li>Engineered oak plank flooring</li>
<li>Recessed halogen lighting</li>
<li>Stainless steel electrical sockets</li>
<li>Architectural detailing</li>
<li>Unique contemporary style</li>
<li>Wonderful decking area creating the perfect link between outside and in.</li>
</ul>
<p>Falcon Ridge is an exclusive and unique development of 15 <a title="Holiday Homes for Sale" href="http://www.falconridgeliving.co.uk" target="_blank">luxury holiday homes</a>, marrying beautiful quality and contemporary styling with a truly wonderful and natural setting. Offering <a title="Contemporary Living" href="http://www.falconridgeliving.co.uk" target="_blank">contemporary living</a> in a magnificent location, each home at Falcon Ridge is nestled within its own landscaped and spacious plot each with its own wonderful outlook – a truly perfect environment in which to relax, unwind and breathe.</p>
<p>The two bedroom homes at Falcon Ridge reflect the wonderfully natural setting in which they exist. Extensively built from timber harvested from sustainable forests – still the most beautiful building material available - before being blended with contemporary styling and state of the art appliances.</p>
<p><a title="Holiday Homes for Sale in Cornwall" href="http://www.falconridgeliving.co.uk" target="_blank">Click here to launch the website</a></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p><a title="Lodges for Sale" href="http://www.falconridgeliving.co.uk" target="_blank">lodges for sale</a>, <a title="Holiday Lodges for Sale" href="http://www.falconridgeliving.co.uk" target="_blank">holiday lodges for sale</a>, <a title="Residential Holiday Homes for Sale" href="http://www.falconridgeliving.co.uk" target="_blank">residential holiday homes for sale</a>, <a title="Holiday Lodges for Sale Cornwall" href="http://www.falconridgeliving.co.uk">holiday lodges for sale cornwall</a>, <a title="Beach Holiday Lodges for Sale" href="http://www.falconridgeliving.co.uk" target="_blank">beach holiday lodges for sale</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.minimalistics.co.uk/blog/falcon-ridge-holiday-lodges-site-launch/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CSS Shorthand - a few simple tips!</title>
		<link>http://www.minimalistics.co.uk/blog/css-shorthand-a-few-simple-tips/</link>
		<comments>http://www.minimalistics.co.uk/blog/css-shorthand-a-few-simple-tips/#comments</comments>
		<pubDate>Sat, 07 Jun 2008 07:36:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[CSS]]></category>

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

		<category><![CDATA[star hack]]></category>

		<guid isPermaLink="false">http://www.minimalistics.co.uk/blog/?p=107</guid>
		<description><![CDATA[Anyone who works with css knows the great potential and flexibility that it has given designers, enabling us to create beautifully designed and well coded websites. By taking advantage of simple css shortcuts (e.g a line of code relating to one property) you will be able to reap the benefits of time saving and effective [...]]]></description>
			<content:encoded><![CDATA[<p>Anyone who works with css knows the great potential and flexibility that it has given designers, enabling us to create beautifully designed and well coded websites. By taking advantage of simple css shortcuts (e.g a line of code relating to one property) you will be able to reap the benefits of time saving and effective code, not only helping you create, but also eliminate any issues that might arise and also make updating much faster.</p>
<p>A common assumption by newbie cssers is to specify each individual property line by line (this is by all means not wrong, but it is however a longwinded way of writing your css). Below in the next set of examples i will try to explain some of the basic methods for shortening your css.</p>
<p><strong>Inefficient code</strong><br />
<code>#selector {<br />
margin-top:25px;<br />
margin-right:0px;<br />
margin-bottom:25px;<br />
margin-left:0px;<br />
}</code></p>
<p><strong>Efficient code</strong><br />
<code>#selector{<br />
margin:25px 10px 25px 10px;<br />
}</code></p>
<p>As you can see we have manage to shorten the css styling from 6 lines to only 3. The way this works is by setting the properties in order: <strong>Top</strong>, <strong>Right</strong>, <strong>Bottom</strong> and then <strong>Left</strong>.</p>
<p>Similarly to simplify your code further you could use the following for the padding attribute:</p>
<p><code>#selector{<br />
margin:25px 10px;<br />
}</code></p>
<p>This works by setting the top and bottom margin to 25px and the left and right margin to 10px;</p>
<p>If the all of the attributes are the same (e.g top, right, bottom and left) you can simplify your code once again:</p>
<p><code>#selector{<br />
margin:40px;<br />
}</code></p>
<p>The example above shows an example where a 40px margin is required on the top, right, bottom and left of your div.</p>
<p>This method isn&#8217;t just used for the margin attribute it can also be used for things such as padding and the same principle can be carried into things such as font, background, border etc. Below i will show some example of long winded css compared to shorthand css.</p>
<h2 class="swf">Fonts</h2>
<p><strong>Example 1</strong><br />
<code>#selector {<br />
font-weight: bold;<br />
font-family: verdana;<br />
font-size: 115%;<br />
}</code></p>
<p><strong>Example 1 in short hand</strong><br />
<code>#selector{<br />
font: bold 115% verdana;<br />
}</code></p>
<h2 class="swf">Background</h2>
<p><strong>Example 2</strong><br />
<code>#selector {<br />
background-color:#003366;<br />
background-image:url(images/background.gif);<br />
background-position:top;<br />
background-repeat:no-repeat;<br />
}</code></p>
<p><strong>Example 2 in short hand</strong><br />
<code>#selector{<br />
background:#003366 url(images/background.gif) top no-repeat;<br />
}</code></p>
<h2 class="swf">Borders</h2>
<p><strong>Example 3</strong><br />
<code>#selector {<br />
border-weight:1px;<br />
border-style:solid;<br />
border-color:#ffcc00;<br />
}</code></p>
<p><strong>Example 3 in short hand</strong><br />
<code>#selector{<br />
border:1px solid #ffcc00;<br />
}</code></p>
<p>As you can see the above examples show a clear demonstration of how to code more efficiently.</p>
<h2 class="swf">Body is your friend</h2>
<p>Another common mistake that i often see when editing other peoples work is the constant use of font this, font that, and its used on nearly every div, or element of the xhtml document.</p>
<p><strong>For example</strong><br />
<code>#mydiv{<br />
font-family:Arial, Helvetica, sans-serif;<br />
font-size:62.5%;<br />
font-weight:bold;<br />
}<br />
.mytextarea{<br />
font-family:Arial, Helvetica, sans-serif;<br />
font-size:62.5%;<br />
font-weight:bold;<br />
}</code></p>
<p>By utilising the body tag correctly you can save your self a lot of hassle and extra code.<br />
Simply start by setting everything in the body tag like below:<br />
<code>body{<br />
font:bold 62.5% Arial, Helvetica, sans-serif;<br />
colour:#000;<br />
}</code></p>
<p>Additionally if you know that you want everything to have the same font, whether it be an input element or just a standard div, make use of the star hack:<br />
<code>*{font-family:Arial, Helvetica, sans-serif;}</code><br />
To find out more regarding the <a href="http://www.minimalistics.co.uk/blog/css-star-hack/" title="star hack">star hack</a> <a href="http://www.minimalistics.co.uk/blog/css-star-hack/" title="star hack">click here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.minimalistics.co.uk/blog/css-shorthand-a-few-simple-tips/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Bookmarks</title>
		<link>http://www.minimalistics.co.uk/blog/bookmarks/</link>
		<comments>http://www.minimalistics.co.uk/blog/bookmarks/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 10:55:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Useful or Random Sites]]></category>

		<guid isPermaLink="false">http://www.minimalistics.co.uk/blog/?p=105</guid>
		<description><![CDATA[Cubcart Skins
http://www.cartdesigns.net/
50 beautiful css designs
http://www.smashingmagazine.com/2006/12/19/50-beautiful-css-based-web-designs-in-2006/
Nice Blog
http://creativebits.org/taxonomy/adobephotoshop?from=50
Mega Proxy
https://www.megaproxy.com/freesurf/ 
Popup
http://www.kirupa.com/developer/flash8/centered_popup_window2.htm
HTML characters
http://www.w3.org/MarkUp/html-spec/html-spec_13.html
Highslide
http://vikjavev.no/highslide/#examples
CSS TRICKS
http://css-tricks.com/the-different-techniques-for-applying-the-png-hack/
Brushes
http://www.bittbox.com/illustrator/28-free-illustrator-brushes-for-making-swooshes-and-swirls/
 
]]></description>
			<content:encoded><![CDATA[<p>Cubcart Skins<br />
http://www.cartdesigns.net/</p>
<p>50 beautiful css designs<br />
http://www.smashingmagazine.com/2006/12/19/50-beautiful-css-based-web-designs-in-2006/</p>
<p>Nice Blog<br />
http://creativebits.org/taxonomy/adobephotoshop?from=50</p>
<p>Mega Proxy<br />
https://www.megaproxy.com/freesurf/ </p>
<p>Popup<br />
http://www.kirupa.com/developer/flash8/centered_popup_window2.htm</p>
<p>HTML characters<br />
http://www.w3.org/MarkUp/html-spec/html-spec_13.html</p>
<p>Highslide<br />
http://vikjavev.no/highslide/#examples</p>
<p>CSS TRICKS<br />
http://css-tricks.com/the-different-techniques-for-applying-the-png-hack/</p>
<p>Brushes<br />
http://www.bittbox.com/illustrator/28-free-illustrator-brushes-for-making-swooshes-and-swirls/</p>
<p> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.minimalistics.co.uk/blog/bookmarks/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Excluding Posts from the Index Page on Wordpress</title>
		<link>http://www.minimalistics.co.uk/blog/excluding-posts-from-the-index-page-wordpress/</link>
		<comments>http://www.minimalistics.co.uk/blog/excluding-posts-from-the-index-page-wordpress/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 20:59:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[PHP]]></category>

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

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

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

		<guid isPermaLink="false">http://www.minimalistics.co.uk/blog/?p=104</guid>
		<description><![CDATA[If you have ever wanted to exclude posts from your homepage on wordpress keep reading&#8230;..
Excluding posts on the index page of the blog was one of those things that i knew was possible but never really got around to actually doing it!
I thought i would share the solution to the problem as i managed to [...]]]></description>
			<content:encoded><![CDATA[<p>If you have ever wanted to exclude posts from your homepage on wordpress keep reading&#8230;..</p>
<p>Excluding posts on the index page of the blog was one of those things that i knew was possible but never really got around to actually doing it!</p>
<p>I thought i would share the solution to the problem as i managed to find a quick and easy way of excluding the posts.</p>
<h2 class="swf">Here&#8217;s how you do it</h2>
<p><strong>Step 1</strong><br />
Locate the <strong>index.php</strong> file in your current active theme. This is usually situated in the &#8216;wp-content/themes/&#8217; folder of your server. Once you have located this folder pick your current theme and look inside to find the index.php file. You will then need to download this file and open in your default editor.</p>
<p><strong>Step 2</strong><br />
Once you&#8217;ve managed to open the file do a search for the following line of code:<br />
<code>&lt;?php while (have_posts()) : the_post(); ?&gt;</code></p>
<p>You will then need to insert the following code so you have something that looks like this:<br />
<code>&lt;?php while (have_posts()) : the_post(); ?&gt;<br />
        &lt;?php if (in_category(&#039;79&#039;)) continue; ?&gt;</code></p>
<p><strong>Step 3</strong><br />
Notice that the category 79 has been used in this example.<br />
To find the id of the category that you want to exclude from the homepage simply login to your admin page and head over to the manage > categories section. Once there simply mouse over the category name that you wish to exclude and notice in the url there will be an id number (this normally displayed to the bottom of your browser).</p>
<p><strong>Extra Steps</strong><br />
If you want to exclude multiple categories simply duplicate the same line of code as shown above changing the id number. See the example below:</p>
<p><code>&lt;?php while (have_posts()) : the_post(); ?&gt;<br />
        &lt;?php if (in_category(&#039;79&#039;)) continue; ?&gt;<br />
&lt;?php if (in_category(&#039;29&#039;)) continue; ?&gt;<br />
&lt;?php if (in_category(&#039;30&#039;)) continue; ?&gt;<br />
&lt;?php if (in_category(&#039;12&#039;)) continue; ?&gt;</code></p>
<p>This is its as simple as that!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.minimalistics.co.uk/blog/excluding-posts-from-the-index-page-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CSS Navigation Examples</title>
		<link>http://www.minimalistics.co.uk/blog/css-navigation-examples/</link>
		<comments>http://www.minimalistics.co.uk/blog/css-navigation-examples/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 06:51:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[css navigation]]></category>

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

		<guid isPermaLink="false">http://www.minimalistics.co.uk/blog/?p=100</guid>
		<description><![CDATA[Navigation / Drop down Navigation in CSS can cause many problems across different browsers browsers.
After crawling the net i managed to stumble across a good site with some very nice examples, both build wise and visually.
The site links to a number of Horizontal and Vertical drop down menus. 
Click here to check them out.
]]></description>
			<content:encoded><![CDATA[<p>Navigation / Drop down Navigation in CSS can cause many problems across different browsers browsers.</p>
<p>After crawling the net i managed to stumble across a good site with some very nice examples, both build wise and visually.</p>
<p>The site links to a number of Horizontal and Vertical drop down menus. </p>
<p><a title="CSS Navigation" href="http://www.alvit.de/css-showcase/css-navigation-techniques-showcase.php" target="_blank">Click here</a> to check them out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.minimalistics.co.uk/blog/css-navigation-examples/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PHP Include function</title>
		<link>http://www.minimalistics.co.uk/blog/php-include/</link>
		<comments>http://www.minimalistics.co.uk/blog/php-include/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 11:54:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[PHP]]></category>

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

		<guid isPermaLink="false">http://www.minimalistics.co.uk/blog/?p=97</guid>
		<description><![CDATA[Using the php include(); statment can be a handy way to speed up your development time , making it easier to amend or add features to a set template or snippet of code.
I have uploaded a zip file with an example of a few include statements. This can be found at the bottom of this [...]]]></description>
			<content:encoded><![CDATA[<p>Using the php include(); statment can be a handy way to speed up your development time , making it easier to amend or add features to a set template or snippet of code.</p>
<p>I have uploaded a zip file with an example of a few include statements. This can be found at the bottom of this post.</p>
<h2 class="swf">Example Code</h2>
<p><code>&lt;?php include(&quot;includes/filename.php&quot;); ?&gt;</code></p>
<p>Take a look at the attached example and see how you can use the php include function to speed up your development time. </p>
<h2 class="swf">Things to note</h2>
<p>Unless your machine is set up to allow php files to run locally you will need to upload it to your server to test.</p>
<h2 class="swf">Download</h2>
<p><a href='http://www.minimalistics.co.uk/blog/wp-content/uploads/2008/06/php-include-example.zip'>PHP Include Example Download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.minimalistics.co.uk/blog/php-include/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Shuffling an Array in Actionscript</title>
		<link>http://www.minimalistics.co.uk/blog/shuffling-an-array-in-actionscript/</link>
		<comments>http://www.minimalistics.co.uk/blog/shuffling-an-array-in-actionscript/#comments</comments>
		<pubDate>Wed, 28 May 2008 16:16:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Flash / Actionscript]]></category>

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

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

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

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

		<guid isPermaLink="false">http://www.minimalistics.co.uk/blog/shuffling-an-array-in-actionscript/</guid>
		<description><![CDATA[Using arrays in flash is always a handy and efficient way to work with variables etc. But some times its handy to be able to shuffle the results in the array, for example when creating a quiz to allow a random set of questions.
Using the code below (actionscript 2.0 but should still work in 3.0) [...]]]></description>
			<content:encoded><![CDATA[<p>Using arrays in flash is always a handy and efficient way to work with variables etc. But some times its handy to be able to shuffle the results in the array, for example when creating a quiz to allow a random set of questions.</p>
<p>Using the code below (actionscript 2.0 but should still work in 3.0) we create an array and trace the results.</p>
<h2 class='swf'>The Code</h2>
<p><code>Array.prototype.shuffle=function(){<br />
   for(i=0;i&lt;this.length;i++){<br />
      var tempvar=this[i];<br />
      var ranVar=random(this.length);<br />
      this[i]=this[ranVar];<br />
      this[ranVar]=tempvar;<br />
   }<br />
}<br />
myArray=[&quot;flash&quot;,&quot;dreamweaver&quot;,&quot;illustrator&quot;,&quot;in-design&quot;,&quot;photoshop&quot;];<br />
myArray.shuffle();<br />
trace(myArray);<!--formatted--></code></p>
<p>This would return a trace with answers such as:<br />
&#8216;dreamweaver, flash, in-design, photoshop, illustrator&#8217;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.minimalistics.co.uk/blog/shuffling-an-array-in-actionscript/feed/</wfw:commentRss>
		</item>
		<item>
		<title>For loops in Flash - Setting global variables</title>
		<link>http://www.minimalistics.co.uk/blog/for-loops-in-flash-setting-global-variables/</link>
		<comments>http://www.minimalistics.co.uk/blog/for-loops-in-flash-setting-global-variables/#comments</comments>
		<pubDate>Tue, 27 May 2008 16:02:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Flash / Actionscript]]></category>

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

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

		<category><![CDATA[foor loop]]></category>

		<category><![CDATA[global variables]]></category>

		<guid isPermaLink="false">http://www.minimalistics.co.uk/blog/for-loops-in-flash-setting-global-variables/</guid>
		<description><![CDATA[A common &#8216;mistake&#8217; when working with any programming language is over use of code, or rather not being efficient with code. The most common mistake, and most easily rectified is repetition of similar or exact snippet of code, over and over and over and over and over and over again&#8230;. just like the example actionscript [...]]]></description>
			<content:encoded><![CDATA[<p>A common &#8216;mistake&#8217; when working with any programming language is over use of code, or rather not being efficient with code. The most common mistake, and most easily rectified is repetition of similar or exact snippet of code, over and over and over and over and over and over again&#8230;. just like the example actionscript code shown below.</p>
<h3 class="swf">Example of Inefficient use of code</h3>
<p><code>_global.variable1 = 0;<br />
_global.variable2 = 0;<br />
_global.variable3 = 0;<br />
_global.variable4 = 0;<br />
_global.variable5 = 0;<br />
_global.variable6 = 0;<br />
_global.variable7 = 0;<br />
_global.variable8 = 0;<br />
_global.variable9 = 0;<br />
_global.variable10 = 0;<br />
_global.variable11 = 0;<br />
_global.variable12 = 0;<br />
_global.variable13 = 0;</code></p>
<p>In the above example we are simply setting a whole load of global variables in flash. You can imagine that if the number of variables increased, say for example 40 variables, you would need 40 lines of code to achieve the desired result.</p>
<p>To simplify this process i have created a simple snippet of code could be contained within a for loop, creating and setting all of these variables in only 3 lines of code. By using a for loop we can add or decrease the amount of variables increased by changing just one variable.</p>
<h3 class="swf">Efficient use of code</h3>
<p><code>/// set how many variables should be created<br />
number_of_times = 13;</p>
<p>/// loop 13 times creating 13 variables with the value of 0<br />
for (var i = 1; i&lt;(number_of_times+1); i++) {<br />
_global["slide"+i] = 0;<br />
}<!--formatted--></code></p>
<h3 class="swf">The Benefits</h3>
<p>This makes it much easier to increase or decrease the amount of variables created, simply change &#8220;number_of_times = 13&#8243; to a greater number.<br />
If for example we wanted to rename the varaibale from &#8220;variable&#8221; to &#8220;myVariable&#8221; we would ammend one line of code&#8230; not 13 as shown in the initial example.</p>
<p>This method can be applied in a variet of different ways helping you become more productive and efficent with your code.</p>
<p>I hope this simple little explanation helps someone out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.minimalistics.co.uk/blog/for-loops-in-flash-setting-global-variables/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
