<?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>BrianGriggs.com &#187; Future Professionals</title>
	<atom:link href="http://briangriggs.com/category/future-professionals/feed/" rel="self" type="application/rss+xml" />
	<link>http://briangriggs.com</link>
	<description>Tallest librarian in the world</description>
	<lastBuildDate>Mon, 06 Feb 2012 21:28:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Thomas Suarez speaks at TEDxManhattan</title>
		<link>http://briangriggs.com/2011/11/16/thomas-suarez-speaks-at-tedxmanhattan/</link>
		<comments>http://briangriggs.com/2011/11/16/thomas-suarez-speaks-at-tedxmanhattan/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 17:58:18 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Future Professionals]]></category>

		<guid isPermaLink="false">http://briangriggs.com/?p=1845</guid>
		<description><![CDATA[It&#8217;s impressive enough to speak at a TED event. It&#8217;s even more impressive when you&#8217;re in 6th grade.]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s impressive enough to speak at a TED event. It&#8217;s even more impressive <a href="http://www.tecca.com/news/2011/11/11/junior-high-app-developer/" target="_blank">when you&#8217;re in 6th grade</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://briangriggs.com/2011/11/16/thomas-suarez-speaks-at-tedxmanhattan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ScriptTD &#8211; An Open Source Tower Defense Game Engine</title>
		<link>http://briangriggs.com/2011/11/08/scripttd-an-open-source-tower-defense-game-engine/</link>
		<comments>http://briangriggs.com/2011/11/08/scripttd-an-open-source-tower-defense-game-engine/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 18:28:13 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Creating a Mobile App]]></category>
		<category><![CDATA[Future Professionals]]></category>
		<category><![CDATA[Game]]></category>

		<guid isPermaLink="false">http://briangriggs.com/?p=1831</guid>
		<description><![CDATA[Coding4Fun has put up the source code for a tower defense game on Codeplex. With it, you can make a game for a Windows phone and even put it up on the Zune marketplace. If you can make an image in Paint, you can make your own game. What makes the project so cool, though, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://channel9.msdn.com/coding4fun/" target="_blank">Coding4Fun</a> has put up the source code for a <a href="http://toptowerdefensegames.com/" target="_blank">tower defense</a> game on <a href="http://scripttd.codeplex.com/" target="_blank">Codeplex</a>. With it, you can make a game for a Windows phone and even put it up on the Zune marketplace. If you can make an image in Paint, you can make your own game. What makes the project so cool, though, is that they put up all of the code. Everything can be adjusted.</p>
<p>Download the source code <a href="http://scripttd.codeplex.com/releases/view/71909" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://briangriggs.com/2011/11/08/scripttd-an-open-source-tower-defense-game-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML: Day 1 – Simple text formatting and inserting a picture</title>
		<link>http://briangriggs.com/2011/10/05/html-day-1-%e2%80%93-simple-text-formatting-and-inserting-a-picture-2/</link>
		<comments>http://briangriggs.com/2011/10/05/html-day-1-%e2%80%93-simple-text-formatting-and-inserting-a-picture-2/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 20:00:55 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Creating a Mobile App]]></category>
		<category><![CDATA[Future Professionals]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://briangriggs.com/?p=1765</guid>
		<description><![CDATA[Objective: We will be creating an HTML file with basic code and then previewing it in a web browser. HTML code used in this lesson: &#60;strong&#62; bolds text &#60;em&#62; italicizes text (“em” is short for “emphasis”) &#60;p&#62; shows where a paragraph starts and ends &#60;br&#62; starts a new line &#60;img src&#62; brings in a picture [...]]]></description>
			<content:encoded><![CDATA[<p><em>Objective: We will be creating an HTML file with basic code and then previewing it in a web browser. </em></p>
<p>HTML code used in this lesson:</p>
<p><code>&lt;strong&gt; bolds text<br />
&lt;em&gt; italicizes text (“em” is short for “emphasis”)<br />
&lt;p&gt; shows where a paragraph starts and ends<br />
&lt;br&gt; starts a new line<br />
&lt;img src&gt; brings in a picture<br />
&lt;a href&gt;  creates a link</code></p>
<p>The HTML file we’ll create is going to be extremely basic. Later we’ll add information that meets the standards of the World Wide Web Consortium (W3C) and is coded better.</p>
<p>1.	Open up a text editor like Text Edit or Notepad.<br />
2.	Save it as sample.html. If you don’t put the .html as the file extension, it may not load properly in the browser.<br />
3.	In your new text file, type:</p>
<p><code>This is the sample file. How exciting.</code></p>
<p>4.	Let’s make that “exciting” really exciting. We can make the word “exciting” bold by adding the &lt;strong&gt; tag around it.</p>
<p><code>This is the sample file. How &lt;strong&gt;exciting&lt;/strong&gt;.</code></p>
<p>&lt;strong&gt; lets the browser know that what follows will be bold. &lt;/strong&gt; lets the browser know where to stop. If you leave off the &lt;/strong&gt;, the rest of the page will be one big, bold mess.<br />
5.	Preview the HTML file in your browser. Open up Safari/Firefox/Chrome/Opera/Whatever . Choose File-&gt;Open and then select your HTML file. Check to make sure “exciting” is bold.<br />
6.	Now let’s add emphasis to the word “this” using the &lt;em&gt; tag.</p>
<p><code>&lt;em&gt;This&lt;/em&gt; is the sample file. How &lt;strong&gt;exciting&lt;/strong&gt;.</code></p>
<p>Notice how, just like with &lt;strong&gt;, you need to close out &lt;em&gt; with &lt;/em&gt; or else it never ends.<br />
7.	We’re going to insert a picture, but I don’t want it to be on the same line as the text. Mark the text that we have as a paragraph by adding the &lt;p&gt; tag to the text.</p>
<p><code>&lt;p&gt;&lt;em&gt;This&lt;/em&gt; is the sample file. How &lt;strong&gt;exciting&lt;/strong&gt;.&lt;/p&gt;</code></p>
<p>You can also use the &lt;br&gt; code to start a new line, but when we get into CSS, using the &lt;p&gt; will allow you to do cooler stuff with the paragraph.<br />
8.	Insert a photo using the &lt;img src&gt; code. After the src part, you’ll be telling the browser where the file is stored online. For the sample, we’ll use an image from my site that’s found at http://briangriggs.com/wp-content/uploads/tech.jpg.</p>
<p><code>&lt;p&gt;&lt;em&gt;This&lt;/em&gt; is the sample file. How &lt;strong&gt;exciting&lt;/strong&gt;.&lt;/p&gt;<br />
&lt;img src=”http://briangriggs.com/wp-content/uploads/tech.jpg”&gt;</code></p>
<p>Pay attention to the equals sign and the quotation marks. Whatever’s inside the “” is the direct address for the image. = tells the browser that what’s coming next is the source (src) of the image.<br />
9.	Save the HTML file and run it in your browser to check if the HTML file is working.<br />
10.	The last thing we’ll go over in this lesson is the &lt;a href&gt; tag. &lt;a href&gt; stands for “anchor hypertext reference”. Anchors are placeholders within a document. &lt;a href&gt; lets the browser know that a reference, a link, is coming.</p>
<p>Make the word “sample” a link to briangriggs.com by adding the &lt;a href&gt; tag.</p>
<p><code>&lt;p&gt;&lt;em&gt;This&lt;/em&gt; is the &lt;a href=”http://briangriggs.com”&gt;sample&lt;/a&gt; file. How &lt;strong&gt;exciting&lt;/strong&gt;.&lt;/p&gt;<br />
&lt;img src=”http://briangriggs.com/wp-content/uploads/tech.jpg”&gt;</code></p>
<p>Like with the &lt;img src&gt; tag, we use the =”” to point to a location. Just like the &lt;strong&gt; and &lt;em&gt; tags, we close it out or else the rest of the document will be a link.<br />
11.	Save it and run sample.html in your browser.</p>
]]></content:encoded>
			<wfw:commentRss>http://briangriggs.com/2011/10/05/html-day-1-%e2%80%93-simple-text-formatting-and-inserting-a-picture-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working with variables in Scratch to make a score</title>
		<link>http://briangriggs.com/2010/11/17/working-with-variables-in-scratch-to-make-a-score/</link>
		<comments>http://briangriggs.com/2010/11/17/working-with-variables-in-scratch-to-make-a-score/#comments</comments>
		<pubDate>Wed, 17 Nov 2010 17:01:21 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Future Professionals]]></category>
		<category><![CDATA[Scratch]]></category>
		<category><![CDATA[Tech How To]]></category>

		<guid isPermaLink="false">http://briangriggs.com/?p=1281</guid>
		<description><![CDATA[My demo game for today in Scratch involves checking to see if a button is pressed, changing a variable and a costume if it&#8217;s pressed, and then checking if the required score has been met. The variable is boot to the head. * When the green flag is clicked to start the game, we reset [...]]]></description>
			<content:encoded><![CDATA[<p>My demo game for today in <a href="http://briangriggs.com/category/scratch/">Scratch</a> involves checking to see if a button is pressed, changing a variable and a costume if it&#8217;s pressed, and then checking if the required score has been met.</p>
<p>The variable is <em>boot to the head</em>. *</p>
<p>When the green flag is clicked to start the game, we reset <em>boot to the head</em> and the costume to give the player a fresh start.</p>
<p>Next, we check to see if the spacebar has been pressed. If it has, we change <em>boot to the head</em> by one and do a mini-animation of a cat with a boot to the head. I put a wait command in there so the user&#8217;s eye can actually see the costume change.</p>
<p>We use an &#8220;if&#8230;&#8221; statement (found in the Control section) and use an operator (the green section) to see if <em>boot to the head</em> equals 10, our designated end of the game. If the player has 10 <em>boot to the head</em>s (boots to the head?), we reward them with a positive message of encouragement and then cruelly reset  the score.</p>
<p>This is my demo, but I know that you&#8217;ll need variables to keep track of info in your games for the competition. Use the same techniques for your own variables.</p>
<p><a href="http://briangriggs.com/wp-content/uploads/2010/11/Picture-8.gif"><img src="http://briangriggs.com/wp-content/uploads/2010/11/Picture-8.gif" alt="" title="Picture-8" width="232" height="258" class="alignnone size-full wp-image-1282" /></a><br />
<strong>Notice the big red X. The &#8220;if&#8230;&#8221; statement won&#8217;t work if it&#8217;s not connected to the rounded top of &#8220;When space key pressed&#8221;.</strong></p>
<p>Your code should look like this for the demo:<br />
<a href="http://briangriggs.com/wp-content/uploads/2010/11/Picture-9.png"><img src="http://briangriggs.com/wp-content/uploads/2010/11/Picture-9.png" alt="" title="Picture 9" width="287" height="352" class="alignnone size-full wp-image-1283" /></a><br />
*In no way does Mr. Griggs endorse giving walking cats a boot to the head.</p>
]]></content:encoded>
			<wfw:commentRss>http://briangriggs.com/2010/11/17/working-with-variables-in-scratch-to-make-a-score/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switching Backgrounds/Levels in Scratch</title>
		<link>http://briangriggs.com/2010/11/10/switching-backgroundslevels-in-scratch/</link>
		<comments>http://briangriggs.com/2010/11/10/switching-backgroundslevels-in-scratch/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 21:50:38 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Future Professionals]]></category>
		<category><![CDATA[Scratch]]></category>
		<category><![CDATA[Tech How To]]></category>

		<guid isPermaLink="false">http://briangriggs.com/?p=1257</guid>
		<description><![CDATA[For the STEM video game challenge, we&#8217;re using Scratch to make our games. One of the things you usually need in a video game is the ability to change what the background looks like. First, you&#8217;ll need to create the backgrounds in Scratch: I&#8217;ve created two backgrounds using the built-in paint editor. They&#8217;re very intricate [...]]]></description>
			<content:encoded><![CDATA[<p>For the <a href="http://briangriggs.com/2010/09/20/obamas-stem-video-game-challenge/">STEM video game challenge</a>, we&#8217;re using <a href="http://scratch.mit.edu/">Scratch</a> to make our games.</p>
<p>One of the things you usually need in a video game is the ability to change what the background looks like. First, you&#8217;ll need to create the backgrounds in Scratch:<br />
<a href="http://briangriggs.com/wp-content/uploads/2010/11/Picture-3.png"><img src="http://briangriggs.com/wp-content/uploads/2010/11/Picture-3.png" alt="" title="Picture 3" width="273" height="188" class="alignnone size-full wp-image-1258" /></a><br />
I&#8217;ve created two backgrounds using the built-in paint editor. They&#8217;re very intricate backgrounds named &#8220;background1&#8243; and &#8220;background2&#8243;. You can name yours differently, just remember what you called them. </p>
<p><a href="http://briangriggs.com/wp-content/uploads/2010/11/Picture-4.png"><img src="http://briangriggs.com/wp-content/uploads/2010/11/Picture-4.png" alt="" title="Picture 4" width="248" height="452" class="alignnone size-full wp-image-1259" /></a><br />
These scripts:</p>
<ol>
<li>Reset the background to background1 at the start.</li>
<li>Broadcast either a Go to 1 or Go to 2, depending on what key is pressed.</li>
<li>The script checks what&#8217;s broadcast and changes the level&#8217;s appearance.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://briangriggs.com/2010/11/10/switching-backgroundslevels-in-scratch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Obama&#8217;s STEM Video Game Challenge</title>
		<link>http://briangriggs.com/2010/09/20/obamas-stem-video-game-challenge/</link>
		<comments>http://briangriggs.com/2010/09/20/obamas-stem-video-game-challenge/#comments</comments>
		<pubDate>Mon, 20 Sep 2010 17:02:42 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Future Professionals]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://briangriggs.com/?p=1163</guid>
		<description><![CDATA[This past week President Obama announced the STEM Video Game Challenge to encourage students to pursue math and science through engaging activities. The contest will be accepting submissions from October 12 to January 5. The entries can either be a game design on paper or a playable game. There is a $50,000 prize pool for [...]]]></description>
			<content:encoded><![CDATA[<p>This past week President Obama announced the <a href="http://www.stemchallenge.org/youthprize/Default.aspx" target="_blank">STEM Video Game Challenge</a> to encourage students to pursue math and science through engaging activities. The contest will be accepting submissions from October 12 to January 5. The entries can either be a game design on paper or a playable game. There is a $50,000 prize pool for students and it provides some great opportunities for careers in video game design.</p>
<p>Future Professionals, this is what we&#8217;re going to tackle first. Check out <a href="http://scratch.mit.edu/" target="_blank">Scratch</a> from MIT. It&#8217;s like an intro program to Flash and actually has some pretty decent scripting. (It&#8217;s free, too, which is always nice.)</p>
<p>Here&#8217;s how the judges will be determining the winners:</p>
<blockquote><p>Submissions will be judged on a combination of fun and balanced gameplay, creative vision and incorporation of Science TEchnology and Math (STEM) concepts in game design and play experience.</p></blockquote>
<p><a href="http://scratch.mit.edu/projects/talleslibrarian/1308930">Click here</a> for a game that took me ten minutes to create. In no way does it meet the STEM requirements but it does illustrate a tiny bit of what Scratch does (that would take me much longer to do in Flash ActionScript.)</p>
<p>Try and get the face to the flower. Click on the green flag to get the party started. Arrow keys move the smiley.</p>
]]></content:encoded>
			<wfw:commentRss>http://briangriggs.com/2010/09/20/obamas-stem-video-game-challenge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Re-posting: Creating a quiz game using ActionScript</title>
		<link>http://briangriggs.com/2010/03/31/re-posting-creating-a-quiz-game-using-actionscript/</link>
		<comments>http://briangriggs.com/2010/03/31/re-posting-creating-a-quiz-game-using-actionscript/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 21:49:28 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Future Professionals]]></category>
		<category><![CDATA[Game]]></category>

		<guid isPermaLink="false">http://briangriggs.com/?p=908</guid>
		<description><![CDATA[Today we&#8217;ll be looking at how to make a button-based game. We&#8217;ll need to run in ActionScript 2. The exciting part is that these games will be able to be put into the teachers&#8217; SmartBoard software. Imagine the school playing a game you created. Setting up the Project Open a new Flash document. Click on [...]]]></description>
			<content:encoded><![CDATA[<p>Today we&#8217;ll be looking at how to make a button-based game. We&#8217;ll need to run in ActionScript 2. The exciting part is that these games will be able to be put into the teachers&#8217; SmartBoard software. Imagine the school playing a game you created.</p>
<blockquote><ol>
<strong>Setting up the Project</strong></p>
<li>Open a new Flash document.</li>
<li>Click on Layer 1, Frame 1. Add a <em>stop();</em> action to stop the playhead.</li>
<li>On a new line in the code, establish a variable to hold the score.<br />
The code so far:<br />
<code>stop();<br />
score=0;</code><br />
We set up the score variable here so we can change it as the user gets questions right.</li>
<li>Create a new layer in frame 1.</li>
<li>Create text as a title for your game (so the user isn&#8217;t staring at a white screen).</li>
<p><strong>Making a Button</strong></p>
<li>That&#8217;s great, but we need a way to get past this screen. We&#8217;ll need a button. Click on <strong>Insert->New Symbol</strong> and choose &#8216;Button&#8217;.</li>
<li>Buttons have an Up, Over, Down, and Hit. Up is its natural state. Over is if some hovers a mouse over the button. Down is what it looks like when it gets clicked. Hit is the Hit Zone &#8211; if you want a bigger area to register if it&#8217;s been clicked on or not. Normally Hit is the size of a box around the button.</li>
<li>Make a keyframe in each area to change the states of the buttons (what they look like). Notice that you can insert multiple layers.</li>
<li>Drag that button onto the stage.</li>
<li>The button is clickable, but it doesn&#8217;t know what else to do. With the button selected (blue highlight around it), open up the ActionScript for that button.</li>
<p><strong>Telling the Program to go to the Next Part</strong></p>
<li>Type <em>on(</em> . Remember from previous lessons that when we see the parentheses, it means the function is calling/looking for a variable. Most modern versions of Flash will try and guess which one you want. Select <em>press</em>. (When someone clicks the button, it goes. You could choose <em>release</em> and the user could click and hold and then go when the user releases the mouseclick.)</li>
<li>Add a funky bracket ( <em>{</em> is called a brace, to be technical) to start your list of commands.<br />
The code should now be:<br />
<code>on(press) {</code></li>
<li>Start a new line to maintain style.</li>
<li>Type in <em>gotoAndPlay(2);</em> Notice that the &#8216;A&#8217; and the &#8216;P&#8217; are capitalized. Also look at how the function calls a variable &#8211; the number &#8217;2&#8242; &#8211; to tell the game to go to  frame 2.<br />
The code now is:<br />
<code>on(press) {<br />
gotoAndPlay(2);<br />
}</code></li>
<li>If you run the program right now, when you click, it will go to frame 2 (or even just consider frame 1 the end of the movie if you haven&#8217;t added anything yet to frame 2) but then loop back to frame 1. We need to put a <em>stop(); </em>code  in frame 2 just like we did for frame 1. <strong>You&#8217;ll need to insert a blank keyframe</strong> and then click on the ActionScript arrow.</li>
<li>Once you&#8217;ve added the <em>stop();</em>, on a different layer create text with your question.</li>
<p><strong>Use the Same Button Multiple Times to Make Your Life Easier</strong></p>
<li>We need buttons for our answers. If we create one button in the Flash library, we can then drag it in multiple times and not have to re-do animations. Create that button.</li>
<li>Drag the button from the library onto the stage. Create a text box next to the button that has an answer.</li>
<li>Drag the button from the library <strong>again</strong> onto the stage for the second answer. Put a text box next to the button with an answer.</li>
<p><strong>Checking for the Wrong Answer</strong></p>
<li>Click on the button next to the wrong answer to select it (blue outline).</li>
<li>Let&#8217;s add some code for the wrong answer. Let&#8217;s add a <em>gotoAndPlay(3);</em> to the button (with the <em>on(press)</em> and all that) to take the user to frame 3, which is where we&#8217;ll mock them for getting the wrong answer. (Mock them nicely and politely.)</li>
<li>Make sure to add a <em>stop();</em> code in frame 3 to avoid the jumping loop. You&#8217;ll need to insert a blank keyframe.</li>
<li>Create your end of game screen. Be nice and include a button to take us back to frame 1.</li>
<p><strong>Checking for the Right Answer</strong></p>
<li>Let&#8217;s say the user got the question right. Go back to frame 2 and edit the ActionScript for the correct answer button.</li>
<li>Send the user to the next question &#8211; frame 4 &#8211; with a <em>gotoAndPlay(4); </em>What&#8217;s different this time, though, is that we need to add to the score. On a new line in the ActionScript type in <em>score = score + 10; </em> We just took the score and added 10 points to it. (It will still complete the rest of your list of commands &#8211; but to keep it straight in the minds of the humans who may be reading over your code later, add to the score first and then put in the <em>goto</em>.<br />
The code should look like:<br />
<code>on(press){<br />
	gotoAndPlay(4);<br />
	score = score + 10;<br />
}</code></li>
<p><strong>Displaying a Score</strong></p>
<li>On frame 2, create a new layer. Let&#8217;s label what the user is looking at. Create a text box somewhere on the screen that says &#8216;Score&#8217;. If it&#8217;s on it&#8217;s own layer and it&#8217;s own keyframe, it will constantly say &#8216;Score&#8217; throughout the whole program. </li>
<li>Now let&#8217;s show the actual score. Click on the tool to make a text box, but instead of creating a text box, just click where you want to show the score.</li>
<li>In the Properties at the bottom of the work area, change it from Static to Dynamic text. Dynamic and Static are just like with characters in a story &#8211; dynamic changes, static stays the same.</li>
<li>In that text&#8217;s Properties, there&#8217;s a place called &#8216;Var: &#8216; with an input box next to it. Type in <em>score</em>. It will now show the value for <em>score</em>. Make sure that you don&#8217;t put this in frame 1, because frame 1 is where we initialize/set up the variable.</li>
<p><strong>Thoughts to Enhance the Game</strong></p>
<li>You can add to <em>score</em> whenever the user clicks on the right answer button. You can subtract from <em>score</em>  when a user gets the wrong answer.</li>
<li>You can add as many buttons as you like &#8211; you don&#8217;t just have to have two questions.</li>
<li>Not all buttons need to be easily seen. You could say &#8220;Click on the duck&#8221; but have the Up be blank and have the Over show a duck. The user would have to roll around the screen to try and find the right button.</li>
<li>You can create a variable called <em>whichframe</em> to control which frame a <em>gotoAndPlay</em> goes to. Instead of <em>gotoAndPlay(4);</em> it could be <em>gotoAndPlay(whichframe);</em> </li>
</ol>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://briangriggs.com/2010/03/31/re-posting-creating-a-quiz-game-using-actionscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Isometric Game: Going to the Next Frame</title>
		<link>http://briangriggs.com/2010/03/10/isometric-game-going-to-the-next-frame/</link>
		<comments>http://briangriggs.com/2010/03/10/isometric-game-going-to-the-next-frame/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 21:45:53 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Future Professionals]]></category>
		<category><![CDATA[Game]]></category>

		<guid isPermaLink="false">http://briangriggs.com/?p=895</guid>
		<description><![CDATA[We&#8217;ve got the countdown showing on the hero for our game. If you weren&#8217;t at Future Professionals when we did that, here&#8217;s the link. Let&#8217;s check when the variable scarytimer gets to zero. When it does, we&#8217;ll have the Flash movie go to frame two. Find the line of code in the onEnterFrame function where [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve got the countdown showing on the hero for our game. If you weren&#8217;t at Future Professionals when we did that, <a href="http://briangriggs.com/2010/02/24/isometric-game-displaying-the-timer/">here&#8217;s the link</a>.</p>
<p>Let&#8217;s check when the variable <em>scarytimer</em> gets to zero. When it does, we&#8217;ll have the Flash movie go to frame two. </p>
<p>Find the line of code in the onEnterFrame function where you decrease <em>scarytimer</em>.<br />
<code>scarytimer--;</code></p>
<p>Underneath it, check to see if it&#8217;s less than 0.<br />
<code>scarytimer--;<br />
	if(scarytimer<0){<br />
		gotoAndStop(2);<br />
		scarytimer=0;<br />
	}</code></p>
<p>The gotoAndStop means that we don't have to put a stop(); code in frame 2. It reduces the amount of typing you have to do.</p>
<p>Notice that I added a line to set scarytimer to 0. Instead of going into the negatives, it's now an ominous emptiness.</p>
<p>Now draw/type a message on the stage in frame 2 that lets the player know that time has run out.</p>
<p>That's if they lose. But what if they win?</p>
<p>Find the line that says<br />
<code>if(canvas.map[hero.y][hero.x] == 101){<br />
	trace("Exit");<br />
	}</code></p>
<p>Change:<br />
<code>trace("Exit");</code></p>
<p>to<br />
<code>gotoAndStop(3);<br />
scarytimer=1000;</code></p>
<p>On frame 3 create a message that lets them know they win. Make sure that frame 3 has a new keyframe so frame 2's message doesn't show up.</p>
]]></content:encoded>
			<wfw:commentRss>http://briangriggs.com/2010/03/10/isometric-game-going-to-the-next-frame/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Continuing with the Maze Game in Flash: Beat the Clock!</title>
		<link>http://briangriggs.com/2010/02/10/continuing-with-the-maze-game-in-flash-beat-the-clock/</link>
		<comments>http://briangriggs.com/2010/02/10/continuing-with-the-maze-game-in-flash-beat-the-clock/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 18:59:32 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Future Professionals]]></category>
		<category><![CDATA[Game]]></category>

		<guid isPermaLink="false">http://briangriggs.com/?p=854</guid>
		<description><![CDATA[We&#8217;re going to add a simple timer to our maze game that we&#8217;ve been working on. (If you&#8217;ve missed a few sessions, start here.) We want the timer to start at 1000 and count down to the player&#8217;s imminent doom. To set up the initial value for the timer, let&#8217;s create a variable called scarytimer. [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re going to add a simple timer to our maze game that we&#8217;ve been working on. (If you&#8217;ve missed a few sessions, <a href="http://briangriggs.com/2010/01/26/isometric-game-engine/">start here</a>.)</p>
<p>We want the timer to start at 1000 and count down to the player&#8217;s imminent doom.</p>
<p>To set up the initial value for the timer, let&#8217;s create a variable called <em>scarytimer</em>.<br />
<code>var scarytimer:Number=1000;</code></p>
<p>Put that code at the very top, outside of any functions. If a variable is defined in a function, other functions will see it as undefined. So, at the top of the AcionScript, type in:<br />
<code>var scarytimer:Number=1000;</code><br />
right above where you see<br />
<code>var tiles:Object = new Object({width:52, height:26});</code></p>
<p>The player will start with 1000 loops to be able to get to tile101, <a href="http://briangriggs.com/2010/02/01/a-hero-stepping-on-a-tile/">tile101 being our special tile from last time</a>.</p>
<p>Now we need the player&#8217;s doom.</p>
<p>In the onEnterFrame function, we need to subtract from <em>scarytimer</em> each time the game loops in a frame.</p>
<p>Way back in the olden days when I programmed stone tablets for pterodactyls, we would write <em>scarytimer=scarytimer-1</em> to subtract gradually from the variable with each loop. </p>
<p>ActionScript has simplified it with the code:<br />
<code>scarytimer--;</code><br />
The two minuses tell ActionScript to subtract one increment from the variable.</p>
<p>Put <code>scarytimer--; </code>right above where you see <code>input();</code></p>
<p>Variables get tricky when trying to determine what value they have. Run a trace on the variable to have the computer tell you what value <em>scarytimer</em> has.</p>
<p><code>scarytimer--;<br />
trace(scarytimer);</code></p>
<p>Now the code will decrease <em>scarytimer</em> and then spit out its value to you.</p>
<p><strong>Run your file right now to make sure your variable works. If it doesn&#8217;t, everything else will get nasty quickly.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://briangriggs.com/2010/02/10/continuing-with-the-maze-game-in-flash-beat-the-clock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Continuing in Isometrics: A hero stepping on a tile</title>
		<link>http://briangriggs.com/2010/02/01/a-hero-stepping-on-a-tile/</link>
		<comments>http://briangriggs.com/2010/02/01/a-hero-stepping-on-a-tile/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 21:00:09 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Future Professionals]]></category>
		<category><![CDATA[Game]]></category>

		<guid isPermaLink="false">http://briangriggs.com/?p=835</guid>
		<description><![CDATA[We started with this great game engine and we edited the arrays to add walls at different locations on the map. This week we&#8217;re going to add a custom floor tile that: Checks to see if the hero is standing on the tile. If the hero is on the tile, sends the entire Flash timeline [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://briangriggs.com/2010/01/26/isometric-game-engine/">We started with this great game engine</a> and we edited the arrays to add walls at different locations on the map. This week we&#8217;re going to add a custom floor tile that:</p>
<ul>
<li>Checks to see if the hero is standing on the tile.</li>
<li>If the hero is on the tile, sends the entire Flash timeline to the next frame.</li>
</ul>
<p>First let&#8217;s make sure we know how to recognize the hero stepping on a tile.</p>
<ol>
<li>Open up your project file from last week. (Remember: the <a href="http://briangriggs.com/wp-content/uploads/2010/01/isometric.zip">original file can be found here if you were gone</a>.)</li>
<li>Open up the project&#8217;s library.</li>
<li>Right-click/CTRL+click on the &#8217;tile100&#8242; movie clip in the library. Choose &#8216;Duplicate&#8217;.</li>
<li>Name it &#8217;tile101&#8242;. Make sure to click the checkbox next to Linkage: Export for ActionScript.</li>
<li>Double-click the &#8217;tile101&#8242; movie clip to edit it. Double-click the square and select a new color from the paintbucket for it.</li>
<li>Click on Scene 1 to go back to the main timeline.</li>
<li>Click on the frame with all the ActionScript in it. To edit the ActionScript, click on the arrow in the frame&#8217;s Properties window.</li>
<li>Look for the code that reads:
<p><code>_root.onEnterFrame = function():Void<br />
{<br />
	input(); // Handle keyboard movement<br />
	return;</p>
<p>};</code><br />
Let&#8217;s add a message that pops up, showing that the exit was stepped on. We&#8217;ll use the <em>trace</em> function for that:<br />
<code>_root.onEnterFrame = function():Void<br />
{<br />
	input(); // Handle keyboard movement<br />
	if(canvas.map[hero.y][hero.x] == 101) trace("Exit");<br />
	return;</p>
<p>};</code>
</li?<br />
</ol>
<p>A message should pop up in the debugger window with the word &#8220;Exit&#8221; showing up while you step on the tile.</p>
<p>Now that we can tell if the tile is being stepped on, see if you can figure out how to send the hero to a new map.</p>
]]></content:encoded>
			<wfw:commentRss>http://briangriggs.com/2010/02/01/a-hero-stepping-on-a-tile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.318 seconds -->

