<?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>ActionSnippet</title>
	<atom:link href="http://actionsnippet.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://actionsnippet.com</link>
	<description>paste it in your timeline - or in your constructor</description>
	<pubDate>Sun, 07 Feb 2010 07:29:52 +0000</pubDate>
	
	<language>en</language>
			<item>
		<title>Prefix Notation (Lisp Style)</title>
		<link>http://actionsnippet.com/?p=2701</link>
		<comments>http://actionsnippet.com/?p=2701#comments</comments>
		<pubDate>Thu, 04 Feb 2010 18:43:27 +0000</pubDate>
		<dc:creator>Zevan</dc:creator>
		
		<category><![CDATA[Math]]></category>

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

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

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

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

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

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

		<guid isPermaLink="false">http://actionsnippet.com/?p=2701</guid>
		<description><![CDATA[Today's quiz is not multiple choice. Instead, your task is to write a lisp style math parser. This may sound tricky, but it's surprisingly simple. (well... not simple exactly, it's just simple compared to what one might assume).
Lisp uses prefix notation... where the operator is placed before the operands:
10 * 10 
becomes:
* 10 10 
You [...]]]></description>
			<content:encoded><![CDATA[<p>Today's quiz is not multiple choice. Instead, your task is to write a <a href="http://en.wikipedia.org/wiki/Lisp_%28programming_language%29" target="blank">lisp</a> style math parser. This may sound tricky, but it's surprisingly simple. <em>(well... not simple exactly, it's just simple compared to what one might assume).</em></p>
<p>Lisp uses prefix notation... where the operator is placed before the operands:</p>
<p>10 * 10 </p>
<p>becomes:</p>
<p>* 10 10 </p>
<p>You could think of this as a function "*" with two arguments (10, 10). In Lisp this is enclosed with parens:</p>
<p>(* 10 10)</p>
<p>Let's see a few more examples:</p>
<p>100 / 2 + 10</p>
<p>becomes:</p>
<p>(+ (/ 100 2) 10)</p>
<p>...<br />
2 * 4 * 6 * 7</p>
<p>becomes:</p>
<p>(* 2 4 6 7)</p>
<p>...</p>
<p>(2 + 2) * (10 - 2) * 2</p>
<p>becomes </p>
<p>(* (+ 2 2) (- 10 2) 2)</p>
<p>Remember, thinking "functions" really helps. The above can be though of as:</p>
<p>multiply( add(2, 2), subtract(10 , 2), 2)</p>
<p>You should create a function called parsePrefix() that takes a string and returns a number:</p>
<p>Here is some code to test if your parser works properly:</p>
<div class="igBar"><span id="lactionscript-2"><a href="#" onclick="javascript:showPlainTxt('actionscript-2'); return false;">CLICK HERE TO COPY</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-2">
<div class="actionscript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>parsePrefix<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;(* 10 10)&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>parsePrefix<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;(* 1 (+ 20 2 (* 2 7) 1) 2)&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>parsePrefix<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;(/ 22 7)&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>parsePrefix<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;(+ (/ 1 1) (/ 1 2) (/ 1 3) (/ 1 4))&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808080; font-style: italic;">/* Should trace out:</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808080; font-style: italic;">100</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808080; font-style: italic;">74</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808080; font-style: italic;">3.142857142857143</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808080; font-style: italic;">2.083333333333333</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808080; font-style: italic;">*/</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>I highly recommend giving this a try, it was one of those cases where I assumed it would be much trickier than it was.</p>
<p>I've posted my solution <a href="http://www.actionsnippet.com/quiz_answers/prefix_notation.html" target="blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://actionsnippet.com/?feed=rss2&amp;p=2701</wfw:commentRss>
		</item>
		<item>
		<title>AS Quiz #15 (Hardest Quiz Yet)</title>
		<link>http://actionsnippet.com/?p=2697</link>
		<comments>http://actionsnippet.com/?p=2697#comments</comments>
		<pubDate>Tue, 02 Feb 2010 18:26:12 +0000</pubDate>
		<dc:creator>Zevan</dc:creator>
		
		<category><![CDATA[Quiz]]></category>

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

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

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

		<guid isPermaLink="false">http://actionsnippet.com/?p=2697</guid>
		<description><![CDATA[This is probably the hardest quiz yet. After yesterdays very easy quiz I figured I'd do something really trickey... binary is always a good way to make a quiz hard... so most of the questions are about binary operators and ByteArray... there is also one question about Bezier math.
Number of Questions : 7
Difficulty : Hard
Topic [...]]]></description>
			<content:encoded><![CDATA[<p>This is probably the hardest quiz yet. After yesterdays very easy quiz I figured I'd do something really trickey... binary is always a good way to make a quiz hard... so most of the questions are about binary operators and ByteArray... there is also one question about Bezier math.</p>
<p><strong>Number of Questions : 7<br />
Difficulty : Hard<br />
Topic : Binary and Bezier</strong></p>
<link type="text/css" rel="stylesheet" href="http://actionsnippet.com/wp-content/plugins/quizzin/style.css" />
<script type="text/javascript" src="http://actionsnippet.com/wp-includes/js/jquery/jquery.js"></script>
<script type="text/javascript" src="http://actionsnippet.com/wp-content/plugins/quizzin/script.js"></script>

<div class="quiz-area ">
<form action="" method="post" class="quiz-form" id="quiz-13">
<div class='quizzin-question' id='question-1'><div class='question-content'>Which random sequence would you associate the below snippet with?<br><br>

<pre>
for (var i:int = 0; i<4; i++){
  trace(int(Math.random()*2) - 1 | 1);
}
</pre></div><br /><input type='hidden' name='question_id[]' value='70' /><input type='radio' name='answer-70' id='answer-id-598' class='answer answer-1 ' value='598' /><label for='answer-id-598' id='answer-label-598' class=' answer label-1'><span>1, 0, 1, 0</span></label><br /><input type='radio' name='answer-70' id='answer-id-599' class='answer answer-1 ' value='599' /><label for='answer-id-599' id='answer-label-599' class=' answer label-1'><span>2, 1, 0, 1</span></label><br /><input type='radio' name='answer-70' id='answer-id-600' class='answer answer-1 ' value='600' /><label for='answer-id-600' id='answer-label-600' class=' answer label-1'><span>0, 0, 0, 0</span></label><br /><input type='radio' name='answer-70' id='answer-id-601' class='answer answer-1 ' value='601' /><label for='answer-id-601' id='answer-label-601' class=' answer label-1'><span>1, -1, -1, 1</span></label><br /><input type='radio' name='answer-70' id='answer-id-602' class='answer answer-1 ' value='602' /><label for='answer-id-602' id='answer-label-602' class=' answer label-1'><span>-2, 1, -2, 1</span></label><br /></div><div class='quizzin-question' id='question-2'><div class='question-content'>Which of the below sequences would you associate with the following snippet?<br><br>

<pre>
for (var i:int = 0; i<10; i++){
  trace(i & 2);
}
</pre>

<em> You may want to work this out on paper </em></div><br /><input type='hidden' name='question_id[]' value='71' /><input type='radio' name='answer-71' id='answer-id-603' class='answer answer-2 ' value='603' /><label for='answer-id-603' id='answer-label-603' class=' answer label-2'><span>0,0,0,2,2,0,0,0,2,2
</span></label><br /><input type='radio' name='answer-71' id='answer-id-604' class='answer answer-2 ' value='604' /><label for='answer-id-604' id='answer-label-604' class=' answer label-2'><span>0,0,0,0,4,4,4,4,0,0
</span></label><br /><input type='radio' name='answer-71' id='answer-id-605' class='answer answer-2 ' value='605' /><label for='answer-id-605' id='answer-label-605' class=' answer label-2'><span>0,1,0,1,0,1,0,1,0,1</span></label><br /><input type='radio' name='answer-71' id='answer-id-606' class='answer answer-2 ' value='606' /><label for='answer-id-606' id='answer-label-606' class=' answer label-2'><span>0,0,2,2,0,0,2,2,0,0
</span></label><br /><input type='radio' name='answer-71' id='answer-id-607' class='answer answer-2 ' value='607' /><label for='answer-id-607' id='answer-label-607' class=' answer label-2'><span>0,2,0,2,0,2,0,2,0,2</span></label><br /></div><div class='quizzin-question' id='question-3'><div class='question-content'>A quadratic Bézier curve is the path traced by the function B(t), given points P<sub>0</sub>, P<sub>1</sub> and P<sub>2</sub>. <br><br>
<img src="http://www.actionsnippet.com/bez.gif" />
<em>The above is from wikipedia.</em><br><br>

Which of the below lines of actionscript accurately represents the B(t) function? <em>Hint: Try working it out yourself and then choosing the answer that is closest to your own.</em> You can use <a href="http://wonderfl.net/code/3411d85ede72b562a0fbbde801ed43584d682a98" target="blank">this template over at wonderfl </a>to help you work it out:
</div><br /><input type='hidden' name='question_id[]' value='72' /><input type='radio' name='answer-72' id='answer-id-608' class='answer answer-3 ' value='608' /><label for='answer-id-608' id='answer-label-608' class=' answer label-3'><span>Math.pow(1 - t, 2) + p0 + 2 * (1 - t) * t * p1 + t * 2 * p2</span></label><br /><input type='radio' name='answer-72' id='answer-id-609' class='answer answer-3 ' value='609' /><label for='answer-id-609' id='answer-label-609' class=' answer label-3'><span>(1 - t) * 2 * p0 + (1 - t) * p1 + t * t * p2</span></label><br /><input type='radio' name='answer-72' id='answer-id-610' class='answer answer-3 ' value='610' /><label for='answer-id-610' id='answer-label-610' class=' answer label-3'><span> (1 - t) * (1 - t) * p0 + 2 * (1 - t) * t * p1 + t * t * p2</span></label><br /><input type='radio' name='answer-72' id='answer-id-611' class='answer answer-3 ' value='611' /><label for='answer-id-611' id='answer-label-611' class=' answer label-3'><span>(1 - t) * (1 - t) * p * 0 + 2 * (1 - t) * t * p * 1 + t * t * p * 2;</span></label><br /></div><div class='quizzin-question' id='question-4'><div class='question-content'>What is the length of the following ByteArray?<br><br>
<pre>
var bytes:ByteArray = new ByteArray();
bytes.writeInt(0xFFFFFF);
</pre></div><br /><input type='hidden' name='question_id[]' value='73' /><input type='radio' name='answer-73' id='answer-id-612' class='answer answer-4 ' value='612' /><label for='answer-id-612' id='answer-label-612' class=' answer label-4'><span>2</span></label><br /><input type='radio' name='answer-73' id='answer-id-613' class='answer answer-4 ' value='613' /><label for='answer-id-613' id='answer-label-613' class=' answer label-4'><span>4</span></label><br /><input type='radio' name='answer-73' id='answer-id-614' class='answer answer-4 ' value='614' /><label for='answer-id-614' id='answer-label-614' class=' answer label-4'><span>8</span></label><br /><input type='radio' name='answer-73' id='answer-id-615' class='answer answer-4 ' value='615' /><label for='answer-id-615' id='answer-label-615' class=' answer label-4'><span>16</span></label><br /></div><div class='quizzin-question' id='question-5'><div class='question-content'>What is the length of the following ByteArray?<br><br>
<pre>
var bytes:ByteArray = new ByteArray();
bytes.writeInt(0xFFFFFF);
bytes.writeUnsignedInt(0xFFFFFF);
</pre></div><br /><input type='hidden' name='question_id[]' value='74' /><input type='radio' name='answer-74' id='answer-id-620' class='answer answer-5 ' value='620' /><label for='answer-id-620' id='answer-label-620' class=' answer label-5'><span>2</span></label><br /><input type='radio' name='answer-74' id='answer-id-621' class='answer answer-5 ' value='621' /><label for='answer-id-621' id='answer-label-621' class=' answer label-5'><span>4</span></label><br /><input type='radio' name='answer-74' id='answer-id-622' class='answer answer-5 ' value='622' /><label for='answer-id-622' id='answer-label-622' class=' answer label-5'><span>5</span></label><br /><input type='radio' name='answer-74' id='answer-id-623' class='answer answer-5 ' value='623' /><label for='answer-id-623' id='answer-label-623' class=' answer label-5'><span>6</span></label><br /><input type='radio' name='answer-74' id='answer-id-624' class='answer answer-5 ' value='624' /><label for='answer-id-624' id='answer-label-624' class=' answer label-5'><span>8</span></label><br /><input type='radio' name='answer-74' id='answer-id-625' class='answer answer-5 ' value='625' /><label for='answer-id-625' id='answer-label-625' class=' answer label-5'><span>16</span></label><br /></div><div class='quizzin-question' id='question-6'><div class='question-content'>How many bytes does it take to represent a short in a ByteArray?</div><br /><input type='hidden' name='question_id[]' value='75' /><input type='radio' name='answer-75' id='answer-id-571' class='answer answer-6 ' value='571' /><label for='answer-id-571' id='answer-label-571' class=' answer label-6'><span>1</span></label><br /><input type='radio' name='answer-75' id='answer-id-572' class='answer answer-6 ' value='572' /><label for='answer-id-572' id='answer-label-572' class=' answer label-6'><span>2</span></label><br /><input type='radio' name='answer-75' id='answer-id-573' class='answer answer-6 ' value='573' /><label for='answer-id-573' id='answer-label-573' class=' answer label-6'><span>4</span></label><br /><input type='radio' name='answer-75' id='answer-id-574' class='answer answer-6 ' value='574' /><label for='answer-id-574' id='answer-label-574' class=' answer label-6'><span>5</span></label><br /></div><div class='quizzin-question' id='question-7'><div class='question-content'>What will the following snippet trace to the output window?
<br><br>
<pre>
var bytes:ByteArray = new ByteArray();
bytes[0] = 0;
bytes[1] = 0;
bytes[2] = 1;
bytes[3] = 1;

bytes.position = 0

trace(bytes.readInt());
</pre></div><br /><input type='hidden' name='question_id[]' value='76' /><input type='radio' name='answer-76' id='answer-id-616' class='answer answer-7 ' value='616' /><label for='answer-id-616' id='answer-label-616' class=' answer label-7'><span>11</span></label><br /><input type='radio' name='answer-76' id='answer-id-617' class='answer answer-7 ' value='617' /><label for='answer-id-617' id='answer-label-617' class=' answer label-7'><span>16842752
</span></label><br /><input type='radio' name='answer-76' id='answer-id-618' class='answer answer-7 ' value='618' /><label for='answer-id-618' id='answer-label-618' class=' answer label-7'><span>3</span></label><br /><input type='radio' name='answer-76' id='answer-id-619' class='answer answer-7 ' value='619' /><label for='answer-id-619' id='answer-label-619' class=' answer label-7'><span>257</span></label><br /></div><br />
<input type="button" id="next-question" value="Next &gt;"  /><br />

<input type="submit" name="action" id="action-button" value="Show Results"  />
<input type="hidden" name="quiz_id" value="13" />
</form>
</div>


]]></content:encoded>
			<wfw:commentRss>http://actionsnippet.com/?feed=rss2&amp;p=2697</wfw:commentRss>
		</item>
		<item>
		<title>AS Quiz #14</title>
		<link>http://actionsnippet.com/?p=2693</link>
		<comments>http://actionsnippet.com/?p=2693#comments</comments>
		<pubDate>Mon, 01 Feb 2010 16:40:14 +0000</pubDate>
		<dc:creator>Zevan</dc:creator>
		
		<category><![CDATA[Quiz]]></category>

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

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

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

		<guid isPermaLink="false">http://actionsnippet.com/?p=2693</guid>
		<description><![CDATA[Today's quiz is about TextFields.
Number of Questions : 6
Difficulty : Easy
Topic : TextFields
]]></description>
			<content:encoded><![CDATA[<p>Today's quiz is about TextFields.</p>
<p><strong>Number of Questions : 6<br />
Difficulty : Easy<br />
Topic : TextFields</strong><br />
Please go to <a href='http://actionsnippet.com/?p=2693'>AS Quiz #14</a> to view the quiz</p>
]]></content:encoded>
			<wfw:commentRss>http://actionsnippet.com/?feed=rss2&amp;p=2693</wfw:commentRss>
		</item>
		<item>
		<title>AS Quiz #13</title>
		<link>http://actionsnippet.com/?p=2672</link>
		<comments>http://actionsnippet.com/?p=2672#comments</comments>
		<pubDate>Thu, 28 Jan 2010 18:11:25 +0000</pubDate>
		<dc:creator>Zevan</dc:creator>
		
		<category><![CDATA[Quiz]]></category>

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

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

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

		<guid isPermaLink="false">http://actionsnippet.com/?p=2672</guid>
		<description><![CDATA[Today's quiz is not multiple choice. Instead, your task is to draw a spiral using a recursive function.

Optionally you can alter your function to draw other types of spiral forms:

(You can view various solutions in the comments - as well as my solution at wonderfl)




]]></description>
			<content:encoded><![CDATA[<p>Today's quiz is not multiple choice. Instead, your task is to draw a spiral using a recursive function.</p>
<p><img src="http://actionsnippet.com/wp-content/spiral_1.gif" /></p>
<p>Optionally you can alter your function to draw other types of spiral forms:</p>
<p><img src="http://actionsnippet.com/wp-content/spiral_2.gif" /></p>
<p>(You can view various solutions in the comments - as well as <a href="http://wonderfl.net/code/898f8597ded53e7ea3cf151ed9e3a87bf95b7ede">my solution at wonderfl</a>)</p>
<p><img src="http://actionsnippet.com/wp-content/spiral_4.gif" /></p>
<p><img src="http://actionsnippet.com/wp-content/spiral_5.gif" /></p>
<p><img src="http://actionsnippet.com/wp-content/spiral_6.gif" /></p>
<p><img src="http://actionsnippet.com/wp-content/spiral_7.gif" /></p>
]]></content:encoded>
			<wfw:commentRss>http://actionsnippet.com/?feed=rss2&amp;p=2672</wfw:commentRss>
		</item>
		<item>
		<title>QuickBox2D Tutorial</title>
		<link>http://actionsnippet.com/?p=2667</link>
		<comments>http://actionsnippet.com/?p=2667#comments</comments>
		<pubDate>Wed, 27 Jan 2010 18:30:07 +0000</pubDate>
		<dc:creator>Zevan</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

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

		<guid isPermaLink="false">http://actionsnippet.com/?p=2667</guid>
		<description><![CDATA[Today the first part of a 3 part QuickBox2D tutorial went live on active.tutsplus.com
It's an intro tutorial, so it just scratches the surface. Part 2 digs a bit deeper and part 3 covers complex stuff like joints and contacts.... (part 2 and 3 will be posted sometime in the near future).
Check it out here...
]]></description>
			<content:encoded><![CDATA[<p>Today the first part of a 3 part QuickBox2D tutorial went live on <a href="http://active.tutsplus.com/" target="blank">active.tutsplus.com</a></p>
<p>It's an intro tutorial, so it just scratches the surface. Part 2 digs a bit deeper and part 3 covers complex stuff like joints and contacts.... (part 2 and 3 will be posted sometime in the near future).</p>
<p><a href="http://active.tutsplus.com/tutorials/effects/introduction-to-quickbox2d-part-1/">Check it out here...</a></p>
]]></content:encoded>
			<wfw:commentRss>http://actionsnippet.com/?feed=rss2&amp;p=2667</wfw:commentRss>
		</item>
		<item>
		<title>AS Quiz # 12</title>
		<link>http://actionsnippet.com/?p=2659</link>
		<comments>http://actionsnippet.com/?p=2659#comments</comments>
		<pubDate>Tue, 26 Jan 2010 18:32:13 +0000</pubDate>
		<dc:creator>Zevan</dc:creator>
		
		<category><![CDATA[Quiz]]></category>

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

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

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

		<guid isPermaLink="false">http://actionsnippet.com/?p=2659</guid>
		<description><![CDATA[Today's quiz is not multiple choice. Instead, use your choice of the Graphics class or BitmapData to write a function that generates the below image:

Your function need not take any arguments, it need only return a display object containing the above image.
Feel free to post your solution in the comments.
[EDIT] Solutions:
The solutions that have been [...]]]></description>
			<content:encoded><![CDATA[<p>Today's quiz is not multiple choice. Instead, use your choice of the Graphics class or BitmapData to write a function that generates the below image:</p>
<p><img src="http://actionsnippet.com/wp-content/color_picker.jpg" /></p>
<p>Your function need not take any arguments, it need only return a display object containing the above image.</p>
<p>Feel free to post your solution in the comments.</p>
<p>[EDIT] Solutions:</p>
<p>The solutions that have been posted in the comments so far are REALLY nice - they're all worth checking out... and I think everyone posted their code to wonderfl so you can see the result without needing to open flash....</p>
<p>My two solutions:<br />
The first solution is a variation on an example from the book I wrote with Rich Shupe:<br />
<a href="http://www.actionsnippet.com/quiz_answers/quiz_12.html">First Solution</a></p>
<p>The next solution is actually in an old post from this site - it uses setPixel and HSV - RGB conversion:<br />
<a href="http://actionsnippet.com/?p=797">Second Solution</a></p>
<p>Thanks to everyone who posted solutions so far - I'm surprised again by how many people participate in this format of quiz.</p>
]]></content:encoded>
			<wfw:commentRss>http://actionsnippet.com/?feed=rss2&amp;p=2659</wfw:commentRss>
		</item>
		<item>
		<title>AS Quiz #11</title>
		<link>http://actionsnippet.com/?p=2655</link>
		<comments>http://actionsnippet.com/?p=2655#comments</comments>
		<pubDate>Mon, 25 Jan 2010 17:48:23 +0000</pubDate>
		<dc:creator>Zevan</dc:creator>
		
		<category><![CDATA[Quiz]]></category>

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

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

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

		<guid isPermaLink="false">http://actionsnippet.com/?p=2655</guid>
		<description><![CDATA[Today's quiz jumps around from topic to topic, touching on filters, events, BitmapData and more...
Number of Questions : 6
Difficulty : Medium
Topic : Miscellaneous
]]></description>
			<content:encoded><![CDATA[<p>Today's quiz jumps around from topic to topic, touching on filters, events, BitmapData and more...</p>
<p><strong>Number of Questions : 6<br />
Difficulty : Medium<br />
Topic : Miscellaneous</strong></p>
Please go to <a href='http://actionsnippet.com/?p=2655'>AS Quiz #11</a> to view the quiz
]]></content:encoded>
			<wfw:commentRss>http://actionsnippet.com/?feed=rss2&amp;p=2655</wfw:commentRss>
		</item>
		<item>
		<title>AS Quiz #10</title>
		<link>http://actionsnippet.com/?p=2651</link>
		<comments>http://actionsnippet.com/?p=2651#comments</comments>
		<pubDate>Fri, 22 Jan 2010 16:02:24 +0000</pubDate>
		<dc:creator>Zevan</dc:creator>
		
		<category><![CDATA[Quiz]]></category>

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

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

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

		<guid isPermaLink="false">http://actionsnippet.com/?p=2651</guid>
		<description><![CDATA[Today's quiz is about Events and OOP.
Number of Questions : 5
Difficulty : Easy
Topic : Events and OOP
]]></description>
			<content:encoded><![CDATA[<p>Today's quiz is about Events and OOP.</p>
<p>Number of Questions : 5<br />
Difficulty : Easy<br />
Topic : Events and OOP</p>
Please go to <a href='http://actionsnippet.com/?p=2651'>AS Quiz #10</a> to view the quiz
]]></content:encoded>
			<wfw:commentRss>http://actionsnippet.com/?feed=rss2&amp;p=2651</wfw:commentRss>
		</item>
		<item>
		<title>AS Quiz #9</title>
		<link>http://actionsnippet.com/?p=2642</link>
		<comments>http://actionsnippet.com/?p=2642#comments</comments>
		<pubDate>Thu, 21 Jan 2010 16:29:47 +0000</pubDate>
		<dc:creator>Zevan</dc:creator>
		
		<category><![CDATA[Quiz]]></category>

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

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

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

		<guid isPermaLink="false">http://actionsnippet.com/?p=2642</guid>
		<description><![CDATA[There were lots of great submissions to yesterdays quiz. If you haven't seen them, check them out here...
Click here to see two solutions two solutions to yesterdays quiz...
Today's quiz is medium level and covers a few different topics...

Number of Questions : 6
Difficulty : Medium
Topic : Graphics Class and more
]]></description>
			<content:encoded><![CDATA[<p>There were lots of great submissions to yesterdays quiz. If you haven't seen them, check them out <a href="http://actionsnippet.com/?p=2631" target="blank">here</a>...<br />
Click <a href="http://actionsnippet.com/quiz_answers/quiz_8.html" target="blank">here </a>to see two solutions two solutions to yesterdays quiz...</p>
<p>Today's quiz is medium level and covers a few different topics...<br />
<b><br />
Number of Questions : 6<br />
Difficulty : Medium<br />
Topic : Graphics Class and more</b></p>
Please go to <a href='http://actionsnippet.com/?p=2642'>AS Quiz #9</a> to view the quiz
]]></content:encoded>
			<wfw:commentRss>http://actionsnippet.com/?feed=rss2&amp;p=2642</wfw:commentRss>
		</item>
		<item>
		<title>AS Quiz #8</title>
		<link>http://actionsnippet.com/?p=2631</link>
		<comments>http://actionsnippet.com/?p=2631#comments</comments>
		<pubDate>Wed, 20 Jan 2010 16:31:54 +0000</pubDate>
		<dc:creator>Zevan</dc:creator>
		
		<category><![CDATA[Graphics]]></category>

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

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

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

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

		<guid isPermaLink="false">http://actionsnippet.com/?p=2631</guid>
		<description><![CDATA[Today's quiz is not multiple choice. Instead, your task is to write a function that draws stairs that look like this:

Your function should have the following arguments:

drawStairs(graphics, stairNum);
// you may include additional arguments for size, depth etc..

Feel free to post your solution in the comments. 
I'll post my solution for this in the comments tomorrow. [...]]]></description>
			<content:encoded><![CDATA[<p>Today's quiz is not multiple choice. Instead, your task is to write a function that draws stairs that look like this:</p>
<p><img src="http://actionsnippet.com/wp-content/stairs.gif" /></p>
<p>Your function should have the following arguments:</p>
<pre>
drawStairs(graphics, stairNum);
// you may include additional arguments for size, depth etc..
</pre>
<p>Feel free to post your solution in the comments. </p>
<p>I'll post my solution for this in the comments tomorrow. There is also another multiple choice quiz in the pipeline for tomorrow...</p>
<p><i>BONUS: Try to use as few Graphics class method calls as possible.</i></p>
<p>You can see my solutions <a href="http://www.actionsnippet.com/quiz_answers/quiz_8.html" target="blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://actionsnippet.com/?feed=rss2&amp;p=2631</wfw:commentRss>
		</item>
	</channel>
</rss>
