<?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>Silvith c&#38;d</title>
	<atom:link href="http://www.silvith.nl/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.silvith.nl</link>
	<description>Personal connection to the blogosphere</description>
	<lastBuildDate>Thu, 01 Dec 2011 10:37:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>AS3 random array generator</title>
		<link>http://www.silvith.nl/2011/12/as3-random-array-generator/</link>
		<comments>http://www.silvith.nl/2011/12/as3-random-array-generator/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 10:32:42 +0000</pubDate>
		<dc:creator>~silvith</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[snippet]]></category>

		<guid isPermaLink="false">http://www.silvith.nl/?p=235</guid>
		<description><![CDATA[A snippet of actionscript 3 code to create random arrays. ]]></description>
			<content:encoded><![CDATA[<p>A snippet of actionscript 3 code to create random arrays.<br />
The <em>allowTwins boolean</em>, when set to false, will prevent multiple occurrences of a number in your array.</p>
<pre>
<code>internal function createRandomArray (newArray:Array, nrElements:int, scopeRandom:int, allowTwins:Boolean) {
			newArray = new Array();
			createNr ();
			function createNr () {
				while (newArray.length &lt; nrElements) {
					var i:int = Math.floor(Math.random() * scopeRandom);
					if (!allowTwins) {
						checkNr (i);
					} else {
						newArray.push (i);
					}
				}
			}
			function checkNr (mynum:int) {
				if (newArray.indexOf(mynum) &lt; 0) {
					newArray.push (mynum);
				} else {
					createNr ();
				}
			}
			return (newArray);
		}</code>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.silvith.nl/2011/12/as3-random-array-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Help, mijn toetsenbord geeft verkeerde tekens weer</title>
		<link>http://www.silvith.nl/2011/07/help-mijn-toetsenbord-geeft-verkeerde-tekens-weer/</link>
		<comments>http://www.silvith.nl/2011/07/help-mijn-toetsenbord-geeft-verkeerde-tekens-weer/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 11:31:16 +0000</pubDate>
		<dc:creator>~silvith</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[PC help]]></category>
		<category><![CDATA[sos]]></category>
		<category><![CDATA[toetsenbord]]></category>
		<category><![CDATA[verkeerde tekens]]></category>

		<guid isPermaLink="false">http://www.silvith.nl/?p=222</guid>
		<description><![CDATA[Je wilt een ? typen maar je ziet een = verschijnen. Of je wil iets (tussen haakjes) zetten, en plotseling staat het )zo&#8216;. Wees niet bang. Je toetsenbord is niet kapot. Wat je gedaan hebt is per ongeluk de taalinstellingen van je computer veranderen. De snelste manier om de originele instellingen terug te zetten, is...]]></description>
			<content:encoded><![CDATA[<p style="font-size:1.5em">Je wilt een <strong>?</strong> typen maar je ziet een <strong>=</strong> verschijnen. Of je wil iets <strong>(</strong>tussen haakjes<strong>)</strong> zetten, en plotseling staat het <strong>)</strong>zo<strong>&#8216;</strong>.</p>
<p>Wees niet bang. Je toetsenbord is niet kapot. Wat je gedaan hebt is <em>per ongeluk de taalinstellingen van je computer veranderen</em>.<br />
De snelste manier om de originele instellingen terug te zetten, is door de toetsen <strong>CTRL</strong> en <strong>SHIFT</strong> <strong>tegelijk</strong> in te drukken.<br />
Je vindt deze toetsen vlak boven elkaar aan de linkerkant van je toetsenbord. Soms is de SHIFT alleen een pijl naarboven.</p>
<p>Probleem opgelost!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.silvith.nl/2011/07/help-mijn-toetsenbord-geeft-verkeerde-tekens-weer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash CS3 AS3 Audio player for playing one sound file</title>
		<link>http://www.silvith.nl/2011/07/flash-cs3-as3-audio-player-for-playing-one-sound-file/</link>
		<comments>http://www.silvith.nl/2011/07/flash-cs3-as3-audio-player-for-playing-one-sound-file/#comments</comments>
		<pubDate>Sat, 09 Jul 2011 19:38:13 +0000</pubDate>
		<dc:creator>~silvith</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[audio player]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[snippet]]></category>

		<guid isPermaLink="false">http://www.silvith.nl/?p=213</guid>
		<description><![CDATA[I created a basic audio player. It&#8217;s purpose is to play one sound file, not as music player but to play instructions for a lesson. It has the play, pause, stop and scrub functionalities. It all works, but the scrub bar is not draggable, but clickable. Here&#8217;s the source files Below&#8217;s the as3 script with...]]></description>
			<content:encoded><![CDATA[<p>I created a basic audio player. It&#8217;s purpose is to play one sound file, not as music player but to play instructions for a lesson. It has the <strong>play</strong>, <strong>pause</strong>, <strong>stop</strong> and <strong>scrub</strong> functionalities.<br />
It all works, but the scrub bar is not draggable, but clickable.</p>
<p><a href="http://www.silvith.nl/snippets/audio_player.zip">Here&#8217;s</a> the source files<br />
Below&#8217;s the as3 script with comments included.</p>
<pre>
<code>//define variables
var clipSnd:Sound = new Sound (new URLRequest("ff2.mp3"));//load sound
var clipCnl:SoundChannel;//create soundchannel
var clipTmr:Timer = new Timer(1000);//create a timer with timerevent per second
var playTime:Number = 37;//the lenght of the mp3, too much fuss to calculate when using only one file
var isPlaying:Boolean = false;
var newPos:Number;
var curPos:Number = 0;
var tmrDuration:Number = 0;

//var nessecary for scrubbar in CS3
//in CS5 use the scaleX option, dunno if this is also possible in CS4
var barTotalWidth = 275;
var barStartWidth = 0;

//define functions
function playMusic(event:MouseEvent):void {
	if (!isPlaying) {
		clipCnl = clipSnd.play(curPos);
		if (clipTmr.running != true) {
			clipTmr.start();
		}
	}
	isPlaying = true;
}

function pauseMusic(event:MouseEvent):void {
	curPos = clipCnl.position;
	clipCnl.stop();
	isPlaying = false;
	clipTmr.stop();
}

function stopMusic(event:MouseEvent):void {
	resetMusic();
}

function scrubMusic(event:MouseEvent):void {
	if (isPlaying) {
		clipCnl.stop();
		tmrDuration = Math.round((event.localX * playTime) / barTotalWidth);
		newPos = tmrDuration * 1000;
		slidermc.width = event.localX;
		clipCnl = clipSnd.play(newPos);
		//trace (event.localX);
	}
}

function updateSlider(event:TimerEvent):void {
	if (tmrDuration &lt; playTime) {
		tmrDuration++;
		slidermc.width = Math.round((tmrDuration * barTotalWidth)/playTime);
		tf.text = String(tmrDuration);
	} else {
		resetMusic();
	}
}

function resetMusic():void {
	clipTmr.stop();
	curPos = 0;
	clipCnl.stop();
	isPlaying = false;
	slidermc.width = barStartWidth;
	tmrDuration = 0;
}

//initialize player
slidermc.width = barStartWidth;
clipCnl = clipSnd.play();
clipTmr.start();
isPlaying = true;

//set eventlisteners
playbtn.addEventListener(MouseEvent.CLICK, playMusic);
pausebtn.addEventListener(MouseEvent.CLICK, pauseMusic);
stopbtn.addEventListener(MouseEvent.CLICK, stopMusic);
scrubbtn.addEventListener(MouseEvent.CLICK, scrubMusic);
clipTmr.addEventListener(TimerEvent.TIMER, updateSlider);

//script by silvith

//on the topic of the length of the sound-file, there are 4 options:
//1. you can add this information to the ID3 tag and access it as mySound.id3.TLEN
//2. you can only use mySound.length when the file is completely loaded,
//	 so you need to check mySound.bytesLoaded against mySound.bytesTotal before using mySound.length
//3. you can import the length through flashvars, i.e. myswf.mp3?sndDur=23
//4. you can do as I did and simply fill in the number of seconds here.
//	 this limits the usage of the audio player to one file.</code>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.silvith.nl/2011/07/flash-cs3-as3-audio-player-for-playing-one-sound-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jquery multiple choice quiz</title>
		<link>http://www.silvith.nl/2011/07/jquery-multiple-choice-quiz/</link>
		<comments>http://www.silvith.nl/2011/07/jquery-multiple-choice-quiz/#comments</comments>
		<pubDate>Sun, 03 Jul 2011 12:14:52 +0000</pubDate>
		<dc:creator>~silvith</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[quiz]]></category>
		<category><![CDATA[snippet]]></category>

		<guid isPermaLink="false">http://www.silvith.nl/?p=195</guid>
		<description><![CDATA[This is the code for a basic multiple choice quiz of which the answers an be either true or false. Consequently, the text output of the feedback can only contain two strings, i.e. &#8220;Yes, this is the correct answer&#8221; and &#8220;Sorry, wrong answer!&#8221;, for every question on the same page. This code goes in the...]]></description>
			<content:encoded><![CDATA[<p>This is the code for a basic multiple choice quiz of which the answers an be either <strong>true</strong> or <strong>false. </strong>Consequently, the text output of the feedback can only contain two strings, i.e.<strong> &#8220;Yes, this is the correct answer&#8221; </strong>and<strong> &#8220;Sorry, wrong answer!&#8221;</strong>, for every question on the same page.</p>
<p>This code goes in the head of the html page:</p>
<pre>
<code>//a link to your jquery file
&lt;script src="js_jquery.js" type="text/javascript"&gt;&lt;/script&gt; 

//the start of the quiz script
&lt;script type="text/javascript"&gt;

//this function turns out the result in the div named answer, below the question
function displayResult(container, correct, questionId){
       // Change the contents
	container = $(container).next()
	container.css('background-color', correct == true ? 'lightgreen' : 'pink');
	container.css('display','block');
	container.html("&lt;b&gt;QUESTION " + (questionId) + ":&lt;/b&gt; " + (correct == true ? "Correct!" : "Wrong!"));
}

//this function passes the relevant div id to displayResult, so displayResult knows which answer div to show
function finalizeAnswer(bttn,c,questionId) {
    displayResult(bttn.parentNode, c, questionId);
}
&lt;/script&gt;</code>
</pre>
<p>And this example of two questions goes into the body of your html page:</p>
<pre>
<code>&lt;div id="1"&gt;
    &lt;div id="question"&gt;
    Question 1:&lt;br/&gt;
    What is the square root of 16?&lt;br/&gt;
    &lt;br/&gt;
    &lt;button onClick="finalizeAnswer(this, false, 1)"&gt;A. 7&lt;/button&gt;
    &lt;button onClick="finalizeAnswer(this, false, 1)"&gt;B. 5&lt;/button&gt;
    &lt;button onClick="finalizeAnswer(this, true, 1)"&gt;C. 4&lt;/button&gt;
    &lt;button onClick="finalizeAnswer(this, false, 1)"&gt;D. 1&lt;/button&gt;
    &lt;/div&gt;
    &lt;div id="answer" style="display:none"&gt;Answer&lt;/div&gt;
&lt;/div&gt;

&lt;div id="2"&gt;
    &lt;div id="question"&gt;
    Question 2:&lt;br/&gt;
    What is the square root of 16?&lt;br/&gt;
    &lt;br/&gt;
    &lt;button onClick="finalizeAnswer(this, false, 2)"&gt;A. 7&lt;/button&gt;
    &lt;button onClick="finalizeAnswer(this, false, 2)"&gt;B. 5&lt;/button&gt;
    &lt;button onClick="finalizeAnswer(this, true, 2)"&gt;C. 4&lt;/button&gt;
    &lt;button onClick="finalizeAnswer(this, false, 2)"&gt;D. 1&lt;/button&gt;
    &lt;/div&gt;
    &lt;div id="answer" style="display:none"&gt;Answer&lt;/div&gt;
&lt;/div&gt;</code>
</pre>
<p>You can style the questions and answers to match your layout.<br />
I borrowed the essence of this quiz from <a href="http://stackoverflow.com/questions/5835735/slide-a-div-up-to-match-its-new-contents-with-jquery/5836019#5836019">this answer</a> by Druttka on <a href="http://stackoverflow.com">stackoverflow</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.silvith.nl/2011/07/jquery-multiple-choice-quiz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Things</title>
		<link>http://www.silvith.nl/2011/02/things/</link>
		<comments>http://www.silvith.nl/2011/02/things/#comments</comments>
		<pubDate>Sun, 13 Feb 2011 18:43:22 +0000</pubDate>
		<dc:creator>~silvith</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.silvith.nl/?p=185</guid>
		<description><![CDATA[It&#8217;s been a long time, as these things go. I don&#8217;t even like blogging I&#8217;m on facebook now: www.facebook.com/silvith It&#8217;s slightly regularly updated ^^]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a long time, as these things go. I don&#8217;t even like blogging <img src='http://www.silvith.nl/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
I&#8217;m on facebook now: <a href="http://www.facebook.com/silvith" target="_blank">www.facebook.com/silvith</a></p>
<p>It&#8217;s slightly regularly updated ^^</p>
]]></content:encoded>
			<wfw:commentRss>http://www.silvith.nl/2011/02/things/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Who?</title>
		<link>http://www.silvith.nl/2010/06/who-2/</link>
		<comments>http://www.silvith.nl/2010/06/who-2/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 10:59:28 +0000</pubDate>
		<dc:creator>~silvith</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.silvith.nl/?p=180</guid>
		<description><![CDATA[There is the rumour Johnny Depp will play the Doctor in a 2012 movie, written by Russel Davies. Aside from the fact that this is unlikely, I dread the thought that Johnny Depp will be Dr. Who. He&#8217;s a fine actor but this increases the chance for Dr. Who daddy issues with 200%. Also a...]]></description>
			<content:encoded><![CDATA[<p>There is the <a href="http://io9.com/5575898/johnny-depp-playing-the-doctor-in-a-big+screen-doctor-who-movie" target="_blank">rumour </a>Johnny Depp will play the Doctor in a 2012 movie, written by Russel Davies.</p>
<p>Aside from the fact that this is unlikely, I dread the thought that Johnny Depp will be Dr. Who. He&#8217;s a fine actor but this increases the chance for Dr. Who daddy issues with 200%.</p>
<p>Also a quote from Davies is &#8220;and the long-time fans will not be disappointed because yes, the Daleks  make an appearance&#8221;. Yes, because that was the only reason old fans watched the show. What the hell? The &#8220;new Daleks&#8221; look like senseo machines and they are dragged into stories even when they don&#8217;t have much to do there. The whole Dalek thing was the only bad thing about the last episode of the latest season.</p>
<p>NO MORE DALEKS! For heaven&#8217;s sake, try to invent an original enemy race if you must have one.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.silvith.nl/2010/06/who-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Who?</title>
		<link>http://www.silvith.nl/2010/06/who/</link>
		<comments>http://www.silvith.nl/2010/06/who/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 12:50:18 +0000</pubDate>
		<dc:creator>~silvith</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.silvith.nl/?p=173</guid>
		<description><![CDATA[I apologize for the title of this post. However, after the finale of this season of Dr. Who I can only say that Matt Smith does an awesome job. I like him just as much as David Tennant, and I hadn&#8217;t thought that possible ^_^ As for storylines, I liked this season best of all...]]></description>
			<content:encoded><![CDATA[<p>I apologize for the title of this post.</p>
<p>However, after the finale of this season of Dr. Who I can only say that Matt Smith does an awesome job. I like him just as much as David Tennant, and I hadn&#8217;t thought that possible ^_^</p>
<p>As for storylines, I liked this season best of all I have seen so far. I hope next year will be just as great.</p>
<p>And bow ties are cool (when you&#8217;re the Doctor)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.silvith.nl/2010/06/who/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No Tomorrow</title>
		<link>http://www.silvith.nl/2010/06/no-tomorrow/</link>
		<comments>http://www.silvith.nl/2010/06/no-tomorrow/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 20:00:11 +0000</pubDate>
		<dc:creator>~silvith</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.silvith.nl/?p=175</guid>
		<description><![CDATA[The title of my websites so far has consistently been No Tomorrow. From version 1.0, its layout a table, its background lime green and its text in comic sans ms, red and bold, to version 8.0, built with php and css. No Tomorrow. It&#8217;s not that I didn&#8217;t believe there would be a tomorrow. The...]]></description>
			<content:encoded><![CDATA[<p>The title of my websites so far has consistently been <strong>No Tomorrow</strong>. From version 1.0, its layout a table, its background lime green and its text in comic sans ms, red and bold, to version 8.0, built with php and css. No Tomorrow.</p>
<p>It&#8217;s not that I didn&#8217;t believe there would be a tomorrow. The title was derived from a line in a song by <a href="http://www.theoffspring.com" target="_blank">The Offspring</a>:</p>
<blockquote><p>Our generation sees the world<br />
Not the same as before<br />
We might as well just throw it all<br />
And live like there‘s no tomorrow<br />
There‘s no tomorrow<br />
We are the ones<br />
Who are living under the gun every day<br />
You might be gone before you know<br />
So live like there‘s no tomorrow<br />
Ain‘t gonna waste this life<br />
There‘s no tomorrow – you ain‘t gonna live it for me<br />
Believe it<br />
The official view of the world has changed<br />
In a whole new way<br />
Live fast cause if you don‘t take it<br />
You‘ll never make it<br />
So if you understand me<br />
And if you feel the same<br />
Then you will know what nitro means<br />
You‘ll live like there‘s no tomorrow – ain‘t gonna waste this life<br />
There‘s no tomorrow – you ain‘t gonna live it for me<br />
There‘s no tomorrow</p></blockquote>
<p>You can listen to it <a href="http://www.offspring.com/cgi-bin/WebObjects/Offspring.woa/wa/albums?releaseName=Smash" target="_blank">here</a> , it&#8217;s called <strong>Nitro [Youth Energy]</strong></p>
<p>I think the title also came from a song I used to listen to all the time, <em>Ancient Dreams</em> by Candlemass &#8230;<em>there&#8217;s no tomorrow, just sadness and sorrow, hold on to the ancient dreams&#8230;<br />
</em>Both completely different songs &#8211; one pointing to the now and one trying to escape from it.</p>
<p>Somewhere along the line No Tomorrow became the name of a student clan I wrote a story about and it got its place in that story, so I stopped using it. But I might adopt it again.</p>
<p>Talk about a post that has no relevancy, no meaning:s This is what&#8217;s wrong with the internet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.silvith.nl/2010/06/no-tomorrow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>World of Warcraft</title>
		<link>http://www.silvith.nl/2010/06/world-of-warcraft/</link>
		<comments>http://www.silvith.nl/2010/06/world-of-warcraft/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 19:42:00 +0000</pubDate>
		<dc:creator>~silvith</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.silvith.nl/?p=152</guid>
		<description><![CDATA[World of Warcraft - or the day I dropped off the planet again]]></description>
			<content:encoded><![CDATA[<p>World of Warcraft<br />
- or the day I dropped off the planet again</p>
]]></content:encoded>
			<wfw:commentRss>http://www.silvith.nl/2010/06/world-of-warcraft/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It&#8217;s a boy!</title>
		<link>http://www.silvith.nl/2010/06/its-a-boy/</link>
		<comments>http://www.silvith.nl/2010/06/its-a-boy/#comments</comments>
		<pubDate>Sun, 20 Jun 2010 20:38:12 +0000</pubDate>
		<dc:creator>~silvith</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.silvith.nl/?p=169</guid>
		<description><![CDATA[I&#8217;ve been busy the past months. With the greatest creative achievement of my life so far. May 15th it went live ^____^ He&#8217;s so sweet, my lovely baby boy. And such a miracle! He has ten toes, ten fingers and the most detailed little ears. I&#8217;d never imagined how a baby is only a future...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been busy the past months. With the greatest creative achievement of my life so far. May 15th it went live ^____^</p>
<p><a href="http://www.silvith.nl/wp-content/uploads/2010/06/Níall-08.jpg"><img class="aligncenter size-medium wp-image-170" title="Níall" src="http://www.silvith.nl/wp-content/uploads/2010/06/Níall-08-199x300.jpg" alt="" width="199" height="300" /></a>He&#8217;s so sweet, my lovely baby boy. And such a miracle! He has ten toes, ten fingers and the most detailed little ears. I&#8217;d never imagined how a baby is only a future human being, how blank and abstract they are when they&#8217;re born. I&#8217;d never imagined how easy it is to love them, instantly and completely.</p>
<p>But I&#8217;ll stop here, before I dissolve in motherly pride. He&#8217;s the greatest and I hope I can give him all he needs to become a happy asset to humankind. Or possibly a Time Lord, that would be awesome too ^^</p>
]]></content:encoded>
			<wfw:commentRss>http://www.silvith.nl/2010/06/its-a-boy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

