<?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>DeeGeeBlog</title>
	<atom:link href="http://www.dongarber.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dongarber.com/blog</link>
	<description>UberNerd-In-Training</description>
	<lastBuildDate>Fri, 24 Feb 2012 05:17:11 +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>A sign Flash is on the outs?</title>
		<link>http://www.dongarber.com/blog/2011/10/proof-flash-giving-ground-to-html5/</link>
		<comments>http://www.dongarber.com/blog/2011/10/proof-flash-giving-ground-to-html5/#comments</comments>
		<pubDate>Sun, 02 Oct 2011 19:21:21 +0000</pubDate>
		<dc:creator>DonnieG</dc:creator>
				<category><![CDATA[Observations]]></category>

		<guid isPermaLink="false">http://www.dongarber.com/blog/?p=188</guid>
		<description><![CDATA[Saw this job listing on indeed.com for an HTML5 developer: Our local technology client is looking for a developer to convert Flash assets to HTML5 for maximum cross browser and iOS (iPhone/iPad) compatibility. They are looking for someone who can act in a consultative manner and assist with conversion issues and create templates as well [...]]]></description>
			<content:encoded><![CDATA[<p>Saw this job listing on indeed.com for an <a href="http://www.creativecircle.com/Jobs/web_development_it_jobs/HTML5_Developer_Flash_Conversion_Project_Seattle_6210_4.aspx">HTML5 developer</a>:</p>
<blockquote><p>Our local technology client is looking for a developer to convert Flash assets to HTML5 for maximum cross browser and iOS (iPhone/iPad) compatibility. They are looking for someone who can act in a consultative manner and assist with conversion issues and create templates as well as someone who can do the hands on execution and development.</p>
<p>Expert knowledge of Flash, ActionScript, JavaScript and, of course, HTML5 will make you successful in this role.</p>
<p>Our client has over 50,000 Flash assets that need to be converted so this is a sizable project for the right candidate!</p></blockquote>
<p>Hmmm&#8230; I know that Adobe is working to include HTML5 and CSS3 structs into the new versions / updates of their products&#8230; Is this job listing a fluke, or a sign of the trend?</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.dongarber.com%2Fblog%2F2011%2F10%2Fproof-flash-giving-ground-to-html5%2F&amp;title=A%20sign%20Flash%20is%20on%20the%20outs%3F" id="wpa2a_2"><img src="http://www.dongarber.com/blog/wp-content/plugins/add-to-any/share_save_256_24.png" width="256" height="24" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.dongarber.com/blog/2011/10/proof-flash-giving-ground-to-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First Page Ranking on Google is easier than you think, and free</title>
		<link>http://www.dongarber.com/blog/2011/02/first-page-ranking-on-google-is-easier-than-you-think-and-free/</link>
		<comments>http://www.dongarber.com/blog/2011/02/first-page-ranking-on-google-is-easier-than-you-think-and-free/#comments</comments>
		<pubDate>Tue, 08 Feb 2011 23:25:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ecommerce]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[organic search]]></category>
		<category><![CDATA[page rank]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://www.dongarber.com/blog/?p=139</guid>
		<description><![CDATA[First Page Ranking on Google, Cheap and Easy. You&#8217;re welcome. Oh, the &#8216;elusive&#8217; first page result ranking for your website on Google&#8230; the holy grail. Bah. It isn&#8217;t tough at all, really. Actually, I accomplished it with an existing site that ranked so poorly, I stopped looking after the 8th page of Google search results. [...]]]></description>
			<content:encoded><![CDATA[<h1>First Page Ranking on Google, Cheap and Easy. You&#8217;re welcome.</h1>
<p><img class="alignleft size-medium wp-image-159" style="margin: 10px;" title="first-page-seo-rank" src="http://www.dongarber.com/blog/wp-content/uploads/2011/02/dreamstime_18048425-300x225.jpg" alt="google first page ranking tips" width="180" height="135" />Oh, the &#8216;elusive&#8217; first page result ranking for your website on Google&#8230; the holy grail.</p>
<p>Bah. It isn&#8217;t tough at all, really. Actually, I accomplished it with an existing site that ranked so poorly, I stopped looking after the 8th page of Google search results.</p>
<p>Follow these three fundamental tips, and you&#8217;ll get there too.</p>
<ol>
<li>Utilize a free Webmasters account on Google</li>
<li>Create and upload a sitemap</li>
<li>Follow very basic meta tagging principles.</li>
</ol>
<p>I did these three things, and the site I was working on went from absolute obscurity to the very first page (#5) for a few important keywords (or search phrases) within two weeks.</p>
<h2>1.) Utilize a free <a href="https://www.google.com/webmasters/tools/home?hl=en">Webmasters </a>account on Google.</h2>
<p>You&#8217;ll have to establish an account with Google if you don&#8217;t already have one. It can be difficult to find using Google&#8217;s menu. I&#8217;ve included a link to it above.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-140" style="margin-top: 15px; margin-bottom: 15px;" title="google-webmaster-seo-tools" src="http://www.dongarber.com/blog/wp-content/uploads/2011/02/webmaster-tools2.jpg" alt="google first page rank easy using webmaster tools free" width="500" height="204" /></p>
<p>Next, click the Add a Site button to add your URL to your Webmasters account:</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-141" style="margin-top: 15px; margin-bottom: 15px;" title="first-page-seo-rank" src="http://www.dongarber.com/blog/wp-content/uploads/2011/02/webmaster-tools3.jpg" alt="google first page ranking seo webmaster tools" width="408" height="309" /></p>
<p style="text-align: left;">Follow the directions to insert a personally-generated tracking code to the index page of your site. You&#8217;ll have the option of inserting this code into the &lt;head&gt; of the web document, or you can have Google generate an individual file that you&#8217;ll just upload to the root of your server. I&#8217;ve always just added the javascript code to the head section of my index pages, it always works.</p>
<p style="text-align: left;">When you have completed that, Google will instruct you to verify ownership of the website by clicking a button. Google will go check that the correct code is correctly placed, and that finishes step one.</p>
<h2 style="text-align: left;">2.) Create and upload a sitemap.xml file to Google.</h2>
<p style="text-align: left;">This may sound difficult and foreboding. This is probably the easiest step. Go to <a href="http://www.xml-sitemaps.com/">XML-Sitemaps.com</a> and enter the URL for your website:</p>
<p style="text-align: center;"><a href="http://www.dongarber.com/blog/wp-content/uploads/2011/02/xmlsitemap.jpg"><img class="aligncenter size-full wp-image-142" style="margin-top: 15px; margin-bottom: 15px;" title="xml-sitemap-seo" src="http://www.dongarber.com/blog/wp-content/uploads/2011/02/xmlsitemap.jpg" alt="create upload sitemap.xml file for first page google rankings" width="450" height="484" /></a></p>
<p style="text-align: left;">It will give you a sitemap.xml file to download to your computer. Next, take that xml file and upload to your root directory.</p>
<p style="text-align: left;">Go back to Google Webmaster tools:</p>
<p style="text-align: center;"><a href="http://www.dongarber.com/blog/wp-content/uploads/2011/02/sitemap.jpg"><img class="size-full wp-image-144 aligncenter" style="margin-top: 15px; margin-bottom: 15px;" title="xml-sitemap-seo" src="http://www.dongarber.com/blog/wp-content/uploads/2011/02/sitemap.jpg" alt="google webmaster tools seo free ranking sitemap upload" width="500" height="116" /></a></p>
<p style="text-align: left;">You&#8217;ll upload your sitemap directly to Google. I like to think that giving Google a sitemap of your site is like giving it directions to your house, the key to the front door, and free reign of the refrigerator and cable television while you&#8217;re out. You make it incredibly easy for Google to spider your URLs on a weekly or monthly basis. Without this, Google comes to your site whenever it has the time. Be a good host, let the Google spider in!</p>
<h2 style="text-align: left;">3.) Follow very basic meta tagging principles.</h2>
<p>It&#8217;s 2011, people. I don&#8217;t know how many webpages I do a view source on, to see no &lt;title&gt; tag, no &lt;keywords&gt; entries, no &lt;description&gt; data, and no &lt;alt&gt; tags on pictures.</p>
<pre id="line1">&lt;head&gt;&lt;title&gt;Title of Your Website&lt;/title&gt;
</pre>
<p>Make the title of each webpage the topic of discussion on that page. If you must include the name of your company,<br />
the name of your blog, do it at the end of the title like this:</p>
<pre>&lt;title&gt;Pulling wheelies on Harleys | F. Barleysheath's blog&lt;/title&gt;</pre>
<p>People are going to search for how to pull a wheelie on a Harley, they won&#8217;t be looking for F. Barleysheath&#8217;s blog, so make the searchable term first in the title.</p>
<p style="text-align: left;">Always include meta attributes for keywords and description, like so:</p>
<pre id="line1">&lt;meta name="keywords" content="pulling wheelies, harley davidson, how to" /&gt;
&lt;meta name="description" content="Pulling wheelies on Harleys isn't hard." /&gt;
</pre>
<p>Notice that the title of the webpage, the keywords, and the description all have the same phrase right at the beginning. This is your opportunity to showcase to the search engines what your site&#8217;s about. Put the title and meta tags in the &lt;head&gt; section of your webpage.</p>
<p>Lastly, add some alt attributes to all your images. It would look like this in html:</p>
<pre id="line15">&lt;img src="wheelie.jpg" <strong>alt="pulling a wheelie on uncle's harley"</strong> /&gt;
</pre>
<p>Enclose in quotation marks a good descriptor of the image,<br />
and try to marry the webpage&#8217;s focus to the image alt tags, and you&#8217;ll be ahead of 80% of the website owners out there.</p>
<p style="text-align: left;">&nbsp;</p>
<p style="text-align: center;">&nbsp;</p>
<p style="text-align: left;">&nbsp;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.dongarber.com%2Fblog%2F2011%2F02%2Ffirst-page-ranking-on-google-is-easier-than-you-think-and-free%2F&amp;title=First%20Page%20Ranking%20on%20Google%20is%20easier%20than%20you%20think%2C%20and%20free" id="wpa2a_4"><img src="http://www.dongarber.com/blog/wp-content/plugins/add-to-any/share_save_256_24.png" width="256" height="24" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.dongarber.com/blog/2011/02/first-page-ranking-on-google-is-easier-than-you-think-and-free/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Reciprocal Linking is Black Hat -Google</title>
		<link>http://www.dongarber.com/blog/2011/02/reciprocal-links-black-hat-google/</link>
		<comments>http://www.dongarber.com/blog/2011/02/reciprocal-links-black-hat-google/#comments</comments>
		<pubDate>Thu, 03 Feb 2011 01:18:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ecommerce]]></category>
		<category><![CDATA[link building]]></category>
		<category><![CDATA[pagerank]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[webmaster]]></category>

		<guid isPermaLink="false">http://www.dongarber.com/blog/?p=133</guid>
		<description><![CDATA[Not too many years ago, reciprocal linking was downright de rigeur for webmasters trying to increase their page rank with Google. In an attempt to show Google that their site was such a great place to go, web owners would exchange links with one another. &#8220;If I add a link to your site, will you [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.dongarber.com/blog/wp-content/uploads/2011/02/blackhat.png"><img class="size-medium wp-image-135 alignright" style="margin: 10px;" title="blackhat" src="http://www.dongarber.com/blog/wp-content/uploads/2011/02/blackhat-300x228.png" alt="reciprocal linking is now black hat" width="300" height="228" /></a>Not too many years ago, reciprocal linking was downright <em>de rigeur</em> for webmasters trying to increase their page rank with Google. In an attempt to show Google that their site was such a great place to go, web owners would exchange links with one another. &#8220;If I add a link to your site, will you add a link on your page to my site?&#8221; For years, this was just standard practice.</p>
<p>The folks at Google are far from dumb, and in their current algorithms they actually check if sites engage in Reciprocal Linking and <a href="http://www.google.com/support/webmasters/bin/answer.py?hl=en&amp;answer=66356">punish them</a> for such an attempt.</p>
<blockquote><p>&#8220;&#8230;[S]ome webmasters engage in link exchange schemes and build  partner pages exclusively for the sake of cross-linking, disregarding  the quality of the links, the sources, and the long-term impact it will  have on their sites. This is in violation of Google&#8217;s Webmaster Guidelines and can negatively impact your site&#8217;s ranking in search results.&#8221;</p></blockquote>
<p>Turns out, this is nothing terribly new, and Google hinted at it a few years ago. In <a href="http://blog.searchenginewatch.com/061218-142634">2006</a>, Google began hinting that they&#8217;d consider &#8216;docking&#8217; reciprocal linking schemes.</p>
<p>Best way to get other sites to link to you and help build your site&#8217;s PageRank?</p>
<blockquote><p>&#8220;The best way to get other sites to create relevant links to yours is to   create unique, relevant content that can quickly gain popularity in the   Internet community. The more useful content you have, the greater the   chances someone else will find that content valuable to their readers   and link to it.&#8221;</p></blockquote>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.dongarber.com%2Fblog%2F2011%2F02%2Freciprocal-links-black-hat-google%2F&amp;title=Reciprocal%20Linking%20is%20Black%20Hat%20-Google" id="wpa2a_6"><img src="http://www.dongarber.com/blog/wp-content/plugins/add-to-any/share_save_256_24.png" width="256" height="24" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.dongarber.com/blog/2011/02/reciprocal-links-black-hat-google/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>E-commerce, or how to make a little money from the intertubes</title>
		<link>http://www.dongarber.com/blog/2011/01/how-to-make-a-little-money-on-internet/</link>
		<comments>http://www.dongarber.com/blog/2011/01/how-to-make-a-little-money-on-internet/#comments</comments>
		<pubDate>Fri, 14 Jan 2011 22:35:18 +0000</pubDate>
		<dc:creator>DonnieG</dc:creator>
				<category><![CDATA[Ecommerce]]></category>

		<guid isPermaLink="false">http://www.dongarber.com/blog/?p=116</guid>
		<description><![CDATA[Ever since my wife turned a $2 thrift store find into a $160 profit on eBay ten years ago, I&#8217;ve never stopped reeling from the possibilities of earning a side income on the internet. I began selling on eBay shortly thereafter, learned what might be profitable purchases. Then, I branched out to my own webstore, [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-122" title="holdingcash" src="http://www.dongarber.com/blog/wp-content/uploads/2011/01/holdingcash-225x300.jpg" alt="making money on internet" width="225" height="300" />Ever since my wife turned a $2 thrift store find into a $160 profit on eBay ten years ago, I&#8217;ve never stopped reeling from the possibilities of earning a side income on the internet. I began selling on eBay shortly thereafter, learned what might be profitable purchases. Then, I branched out to my own <a href="http://dongarber.com/BRS-Website/index-old.html">webstore</a>, and enjoyed a 3 1/2 year career of successful selling. During this time, I opened up a second webstore selling <a href="http://dongarber.com/jetcitypoker/index.html">poker supplies</a> (with marginal success,) and also learned how to bring in residual income through Google ads and affiliate marketing.</p>
<p>There are many ways to do it, and I&#8217;ll begin a series talking about my successes and current efforts.</p>
<h2>Paths to Profit</h2>
<p>Basically, there are a few common paths to earning income using an internet connection/websites:</p>
<ol>
<li>Selling your own items on auction sites like <script type="text/javascript">// <![CDATA[
document.write('<a target="_self" href="http://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_ff3=1&#038;pub=5574635369&#038;toolid=10001&#038;campid=5335827058&#038;customid=ecommercept1&#038;ipn=psmain&#038;icep_vectorid=229466&#038;kwid=902099&#038;mtid=824&#038;kw=lg" mce_href="http://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_ff3=1&amp;pub=5574635369&amp;toolid=10001&amp;campid=5335827058&amp;customid=ecommercept1&amp;ipn=psmain&amp;icep_vectorid=229466&amp;kwid=902099&amp;mtid=824&amp;kw=lg">eBay</a><img style="text-decoration:none;border:0;padding:0;margin:0;" mce_style="text-decoration: none; border: 0; padding: 0; margin: 0;" src="http://rover.ebay.com/roverimp/1/711-53200-19255-0/1?ff3=1&#038;pub=5574635369&#038;toolid=10001&#038;campid=5335827058&#038;customid=ecommercept1&#038;mpt='+Math.floor(Math.random()*999999999)+'" mce_src="http://rover.ebay.com/roverimp/1/711-53200-19255-0/1?ff3=1&amp;pub=5574635369&amp;toolid=10001&amp;campid=5335827058&amp;customid=ecommercept1&amp;mpt='+Math.floor(Math.random()*999999999)+'">');
// ]]&gt;</script><noscript><a target="_self" href="http://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_ff3=1&#038;pub=5574635369&#038;toolid=10001&#038;campid=5335827058&#038;customid=ecommercept1&#038;ipn=psmain&#038;icep_vectorid=229466&#038;kwid=902099&#038;mtid=824&#038;kw=lg">eBay</a><img style="text-decoration:none;border:0;padding:0;margin:0;" src="http://rover.ebay.com/roverimp/1/711-53200-19255-0/1?ff3=1&#038;pub=5574635369&#038;toolid=10001&#038;campid=5335827058&#038;customid=ecommercept1&#038;mpt=[CACHEBUSTER]"></noscript> or your own webstore</li>
<li>Selling items you purchase (at a great discount) and sell for profit on auction sites or your own webstore</li>
<li>Selling items you never own on eBay or your own webstore (the &#8216;drop-ship&#8217; model)</li>
<li>Creating and selling your own created items or information products, usually through your own webstore or <a href="http://www.etsy.com/">Etsy </a>for handmade items</li>
<li>Using affiliate marketers to do the marketing to sell your items (you are responsible for shipping when orders come in from affiliates)</li>
<li>Earning Google AdSense or other advertising display platform like Bing or Yahoo from ads you host on your own blog/website</li>
<li>Making affiliate commissions from others by reviewing or describing items on your blog/website and providing links for readers to purchase these items from the vendors directly.</li>
</ol>
<p>This list is not exhaustive, but does represent the lions&#8217; share of opportunities available to you. I thought it would be fun to retrace my steps and discuss these paths; what helped me and what things I&#8217;d not do if I had the chance!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.dongarber.com%2Fblog%2F2011%2F01%2Fhow-to-make-a-little-money-on-internet%2F&amp;title=E-commerce%2C%20or%20how%20to%20make%20a%20little%20money%20from%20the%20intertubes" id="wpa2a_8"><img src="http://www.dongarber.com/blog/wp-content/plugins/add-to-any/share_save_256_24.png" width="256" height="24" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.dongarber.com/blog/2011/01/how-to-make-a-little-money-on-internet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding sound to Silverlight &#8211; Could it be any easier?</title>
		<link>http://www.dongarber.com/blog/2010/12/adding-sound-to-silverlight-is-stinking-easy/</link>
		<comments>http://www.dongarber.com/blog/2010/12/adding-sound-to-silverlight-is-stinking-easy/#comments</comments>
		<pubDate>Thu, 02 Dec 2010 01:57:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[Observations]]></category>

		<guid isPermaLink="false">http://www.dongarber.com/blog/?p=76</guid>
		<description><![CDATA[(And Adobe&#8230; are you listening?) I&#8217;m ramping up, learning Silverlight / Blend / XAML, and I&#8217;ve been using some great online tutorials and book. I just found out on my own with zero help from anybody how stinking easy it is to incorporate audio to your projects, especially in Blend. Do you know how much [...]]]></description>
			<content:encoded><![CDATA[<p>(And Adobe&#8230; are you listening?)</p>
<p>I&#8217;m ramping up, learning Silverlight / Blend / XAML, and I&#8217;ve been using some great online tutorials and book. I just found out on my own with zero help from anybody how stinking easy it is to incorporate audio to your projects, especially in Blend. Do you know how much <em>ActionScript </em>code you&#8217;d have to write, how much wrangling you&#8217;d need to do to do this very thing in Flash? Uh&#8230; much more.</p>
<div id="attachment_77" class="wp-caption alignleft" style="width: 190px"><a href="http://www.dongarber.com/blog/wp-content/uploads/2010/12/blendsound.png"><img class="size-medium wp-image-77 " style="border: 1px dashed black;" title="blendsound" src="http://www.dongarber.com/blog/wp-content/uploads/2010/12/blendsound-300x214.png" alt="sound behavior silverlight blend" width="180" height="128" /></a><p class="wp-caption-text">Step 1, Drag PlaySoundAction to your object</p></div>
<h3>Step 1:</h3>
<p>On the <em>Assets </em>tab, select <em>Behaviors</em>. On the next panel that opens up, look for (you probably don&#8217;t even need any help from now on&#8230;) look for <em>PlaySoundAction</em>.</p>
<p>You&#8217;re halfway done. Seriously.</p>
<h3>Step 2:</h3>
<p>Drag that <em>PlaySoundAction </em>to whatever icon/image/button/thingamajig on your object list. On the Properties tab, select what type of Trigger Event you&#8217;d like this audio clip to play after (I selected <em>MouseEnter </em>in this example) and under <em>CommonProperties</em>, select the source (I manually imported my mp3 clip to the Projects Library list, and just had to use the down arrow to select it from the list. If not, you can get the audio clip you want by clicking the elipses (&#8230;) to get it from your computer/network.</p>
<div id="attachment_78" class="wp-caption alignleft" style="width: 160px"><a href="http://www.dongarber.com/blog/wp-content/uploads/2010/12/blendsound2.png"><img class="size-thumbnail wp-image-78" style="border: 1px dashed black;" title="blendsound2" src="http://www.dongarber.com/blog/wp-content/uploads/2010/12/blendsound2-150x150.png" alt="set trigger properties for audio playsoundaction silverlight blend" width="150" height="150" /></a><p class="wp-caption-text">Step 2, Choose audio file and Event Trigger</p></div>
<p>And that&#8217;s it.</p>
<p>Now, the audio clip must be in an &#8216;appropriate&#8217; Silverlight format, mp3, mp4, wma, wmv, asf, or asx. You might need to convert an old wav file. Seriously, this was the hardest part of the process.</p>
<p>I&#8217;m going to be the smartest mofo at the Silverlight Firestarter 2010 event&#8230; well, no, no way. Maybe in my family. My mother doesn&#8217;t know jack about Silverlight. So I got that going for me.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.dongarber.com%2Fblog%2F2010%2F12%2Fadding-sound-to-silverlight-is-stinking-easy%2F&amp;title=Adding%20sound%20to%20Silverlight%20%26%238211%3B%20Could%20it%20be%20any%20easier%3F" id="wpa2a_10"><img src="http://www.dongarber.com/blog/wp-content/plugins/add-to-any/share_save_256_24.png" width="256" height="24" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.dongarber.com/blog/2010/12/adding-sound-to-silverlight-is-stinking-easy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First Silverlight VideoPlayer</title>
		<link>http://www.dongarber.com/blog/2010/12/first-silverlight-videoplayer/</link>
		<comments>http://www.dongarber.com/blog/2010/12/first-silverlight-videoplayer/#comments</comments>
		<pubDate>Thu, 02 Dec 2010 01:35:00 +0000</pubDate>
		<dc:creator>DonnieG</dc:creator>
				<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.dongarber.com/blog/?p=71</guid>
		<description><![CDATA[The Microsoft Expression Blend folks have done a smash-up job providing excellent video tutorials for folks new to Silverlight. I began their &#8220;5 Day&#8221; Blend training and just completed my first published Silverlight application, a video player for a fictitious product. As someone who&#8217;s spent time with Adobe Flash and ActionScript 3, I can see [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.dongarber.com/blog/wp-content/uploads/2010/11/fabrikam_ss.png"><img class="alignleft size-thumbnail wp-image-74" style="border: 1px dashed black; margin: 10px;" title="fabrikam_ss" src="http://www.dongarber.com/blog/wp-content/uploads/2010/11/fabrikam_ss-150x150.png" alt="Silverlight video player tutorial screenshot" width="150" height="150" /></a>The Microsoft Expression Blend folks have done a smash-up job providing excellent <a href="http://www.microsoft.com/expression/resources/BlendTraining/">video tutorials</a> for folks new to Silverlight. I began their &#8220;5 Day&#8221; Blend training and just completed my first published Silverlight application, a <a href="http://dongarber.com/silverlight/videoplayer1/index.html">video player</a> for a fictitious product.</p>
<p>As someone who&#8217;s spent time with Adobe Flash and ActionScript 3, I can see how Microsoft&#8217;s Blend can give Flash a run for its money. One great feature that&#8217;s immediatly apparent is that you don&#8217;t need to know how to code (C# or VisualBasic) in order to create an application with some interactivity in Blend/Silverlight. With Flash, without knowing ActionScript, the best you&#8217;ll have is a heck of an animation. AS is required in order to script user interactivity with the application. Not so with Blend.</p>
<p>Here&#8217;s the finished, published version of my first<a href="http://dongarber.com/silverlight/videoplayer1/index.html"> Silverlight video player</a>!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.dongarber.com%2Fblog%2F2010%2F12%2Ffirst-silverlight-videoplayer%2F&amp;title=First%20Silverlight%20VideoPlayer" id="wpa2a_12"><img src="http://www.dongarber.com/blog/wp-content/plugins/add-to-any/share_save_256_24.png" width="256" height="24" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.dongarber.com/blog/2010/12/first-silverlight-videoplayer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Entering the Silverlight Pool &#8211; the water&#8217;s fine!</title>
		<link>http://www.dongarber.com/blog/2010/11/entering-the-silverlight-pool-the-waters-fine/</link>
		<comments>http://www.dongarber.com/blog/2010/11/entering-the-silverlight-pool-the-waters-fine/#comments</comments>
		<pubDate>Sat, 20 Nov 2010 20:02:25 +0000</pubDate>
		<dc:creator>DonnieG</dc:creator>
				<category><![CDATA[Learning]]></category>

		<guid isPermaLink="false">http://www.dongarber.com/blog/?p=66</guid>
		<description><![CDATA[David Kelley, Microsoft Silverlight MVP, is a friend of my wife. They talk industry talk. David held an Interact presentation about Silverlight and Windows 7 phone development at my wife&#8217;s place of business, and thought I&#8217;d take this opportunity to meet him in person. Knowing that I&#8217;m interested in web and application development as a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.dongarber.com/blog/wp-content/uploads/2010/11/Blend4book.jpg"><img class="alignleft size-medium wp-image-69" style="margin: 10px;" title="Expression Blend 4 book" src="http://www.dongarber.com/blog/wp-content/uploads/2010/11/Blend4book-300x300.jpg" alt="expression blend 4 book" width="225" height="225" /></a><a href="http://hackingsilverlight.net/">David Kelley</a>, Microsoft Silverlight MVP, is a friend of my wife. They talk industry talk. David held an <strong><em>Interact</em></strong> presentation about Silverlight and Windows 7 phone development at my wife&#8217;s place of business, and thought I&#8217;d take this opportunity to meet him in person.</p>
<p>Knowing that I&#8217;m interested in web and application development as a career, he personally gave me a copy of <strong><em>Foundation Expression Blend 4</em></strong>. When Ichiro gives you a baseball bat, you are excited to take batting practice as soon as possible, no?</p>
<p>XAML I&#8217;ve learned today:</p>
<p>Making objects visible on the artboard (AS3 translation: the stage) using the name-value pair Visibility=&#8221;Visible&#8221; for visible or Visibility=&#8221;Collapsed&#8221; for invisible. In AS3, I believe it&#8217;s myObject.visible = true or = false.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.dongarber.com%2Fblog%2F2010%2F11%2Fentering-the-silverlight-pool-the-waters-fine%2F&amp;title=Entering%20the%20Silverlight%20Pool%20%26%238211%3B%20the%20water%26%238217%3Bs%20fine%21" id="wpa2a_14"><img src="http://www.dongarber.com/blog/wp-content/plugins/add-to-any/share_save_256_24.png" width="256" height="24" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.dongarber.com/blog/2010/11/entering-the-silverlight-pool-the-waters-fine/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Browser Stats: Where&#8217;s Chrome?</title>
		<link>http://www.dongarber.com/blog/2010/09/browser-stats-wheres-chrome/</link>
		<comments>http://www.dongarber.com/blog/2010/09/browser-stats-wheres-chrome/#comments</comments>
		<pubDate>Sat, 18 Sep 2010 22:04:57 +0000</pubDate>
		<dc:creator>DonnieG</dc:creator>
				<category><![CDATA[Observations]]></category>

		<guid isPermaLink="false">http://www.dongarber.com/blog/?p=59</guid>
		<description><![CDATA[My website doesn&#8217;t get a tremendous amount of traffic, relatively speaking, I know that. I&#8217;m spending some quality time brushing up on CSS now, using my favorite book, CSS: The Missing Manual. In it, the author speaks of little quirks of Microsoft Internet Explorer 5 and 6, and how CSS behaves a little differently using [...]]]></description>
			<content:encoded><![CDATA[<p>My website doesn&#8217;t get a tremendous amount of traffic, relatively speaking, I know that. I&#8217;m spending some quality time brushing up on CSS now, using my favorite book, CSS: The Missing Manual. In it, the author speaks of little quirks of Microsoft Internet Explorer 5 and 6, and how CSS behaves a little differently using those browsers.</p>
<p>For a lark, I thought I&#8217;d check into my own website stats and see what the numbers are.</p>
<p>Nearly 50% of my viewers use Firefox; the most current version of MSIE, 8, is used by a bit more than 35% of my viewers. What&#8217;s interesting is how low on the powerchart Google&#8217;s Chrome is. More viewers are still using MSIE 6. This is a browser that&#8217;s<a href="http://en.wikipedia.org/wiki/Internet_Explorer_6"> been around since 2001</a>&#8230;</p>
<p><img class="aligncenter size-full wp-image-60" title="browerwars0910" src="http://www.dongarber.com/blog/wp-content/uploads/2010/09/browerwars0910.jpg" alt="browser stats september 2010" width="416" height="665" /></p>
<p><strong>Is this consistent with your stats, fellow webmasters?</strong> I personally downloaded and used Chrome for about one day; I found no great benefit over my beloved Firefox platform (I do use MSIE 8 about a third of the time, though).</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.dongarber.com%2Fblog%2F2010%2F09%2Fbrowser-stats-wheres-chrome%2F&amp;title=Browser%20Stats%3A%20Where%26%238217%3Bs%20Chrome%3F" id="wpa2a_16"><img src="http://www.dongarber.com/blog/wp-content/plugins/add-to-any/share_save_256_24.png" width="256" height="24" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.dongarber.com/blog/2010/09/browser-stats-wheres-chrome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silverlight Calculator App Tutorial</title>
		<link>http://www.dongarber.com/blog/2010/09/silverlight-calculator-app-tutorial/</link>
		<comments>http://www.dongarber.com/blog/2010/09/silverlight-calculator-app-tutorial/#comments</comments>
		<pubDate>Sat, 11 Sep 2010 00:02:26 +0000</pubDate>
		<dc:creator>DonnieG</dc:creator>
				<category><![CDATA[Learning]]></category>

		<guid isPermaLink="false">http://www.dongarber.com/blog/?p=48</guid>
		<description><![CDATA[I&#8217;m beginning my own Silverlight training, and hands down a fantastic resource is the .schools toolbox site at Microsoft.com. Get an academic version of Microsoft Blend and follow the tutorial videos. All file assets are provided in the .toolbox pages, along with documentation and top-notch video instruction. Create a Silverlight-based calculator and learn about organizing [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m beginning my own Silverlight training, and hands down a fantastic resource is the .schools toolbox site at Microsoft.com.</p>
<p style="text-align: center;"><a href="http://www.microsoft.com/design/toolbox/"><img class="aligncenter size-medium wp-image-49" title="Microsoft design.toolbox" src="http://www.dongarber.com/blog/wp-content/uploads/2010/09/toolbox-300x182.jpg" alt="design toolbox learn silverlight" width="300" height="182" /></a></p>
<p style="text-align: left;"><a href="https://www.dreamspark.com/Products/Product.aspx?ProductId=31">Get an academic version of Microsoft Blend </a>and follow the tutorial videos. All file assets are provided in the .toolbox pages, along with documentation and top-notch video instruction.</p>
<p style="text-align: left;"><a href="http://www.microsoft.com/design/toolbox/school/modules.aspx?lid=1&amp;mid=2"><img class="alignleft size-medium wp-image-50" style="margin: 10px;" title="toolbox_calculator" src="http://www.dongarber.com/blog/wp-content/uploads/2010/09/toolbox_calculator-300x247.jpg" alt="calculator application using blend and silverlight" width="144" height="119" /></a><a href="http://www.microsoft.com/design/toolbox/school/modules.aspx?lid=1&amp;mid=2">Create a Silverlight-based calculator</a> and learn about organizing an Expression Blend workspace, adding text and effects, and working with keyframes to create simple animations. The video instruction is provided by Jeremy Osborn,  of Avlade.</p>
<p style="text-align: left;">Following along with the Calculator project app is a great way to learn. Primarily, I think, because the workflow you need to take requires a bit of repetition, which translates to remembering.</p>
<ul>
<li>
<div style="text-align: left;">Import images to the silverlight project</div>
</li>
<li>
<div style="text-align: left;">Familiarization with Blend concepts and menus</div>
</li>
<li>
<div style="text-align: left;">learn how the PEN tool works (finally! A mystery to me no more!)</div>
</li>
<li>
<div style="text-align: left;">creating storyboards, and linking behaviors to animations</div>
</li>
</ul>
<p style="text-align: left;">What&#8217;s very different between Blend/Silverlight and Flash/Actionscript is that Blend creates the XAML code under the hood as you add functions, and populate the &#8216;artboard&#8217; (&#8216;stage&#8217; in Flash talk). Here&#8217;s a sample of the XAML code that was generated, entirely unbeknownst to me at the time:</p>
<pre style="text-align: left; padding-left: 30px;">&lt;Canvas x:Name="plusminus" Height="72" HorizontalAlignment="Left" Margin="468,346,0,0"</pre>
<pre style="text-align: left; padding-left: 60px;">VerticalAlignment="Top" Width="106" Clip="M65.499947,7.0624504 ... yadda yadda lots of digits... z"&gt;
    &lt;i:Interaction.Triggers&gt;
     &lt;i:EventTrigger EventName="MouseLeftButtonDown"&gt;
      &lt;im:ControlStoryboardAction Storyboard="{StaticResource PlusMinusPress}"/&gt;
     &lt;/i:EventTrigger&gt;
     &lt;i:EventTrigger EventName="MouseLeftButtonUp"&gt;
      &lt;im:ControlStoryboardAction Storyboard="{StaticResource PlusMinusRelease}"/&gt;
     &lt;/i:EventTrigger&gt;
    &lt;/i:Interaction.Triggers&gt;
    &lt;Image x:Name="image16" Height="72" Width="106" Source="Images/plusMinus.png" Stretch="Fill" RenderTransformOrigin="0.5,0.5"&gt;
     &lt;Image.RenderTransform&gt;
      &lt;TransformGroup&gt;
       &lt;ScaleTransform/&gt;
       &lt;SkewTransform/&gt;
       &lt;RotateTransform/&gt;
       &lt;TranslateTransform/&gt;
      &lt;/TransformGroup&gt;
     &lt;/Image.RenderTransform&gt;
    &lt;/Image&gt;
   &lt;/Canvas&gt;</pre>
<p style="text-align: left;">It looks absolutely nothing like Actionscript 3 to me, it&#8217;s more like XML on steroids. Somewhere, probably soon, the .toolbox tutorials will cover tweaking XAML. Can an entire application be written solely using XAML? I can do a lot of things solely through Actionscript 3, besides importing images/assets into the Library. I don&#8217;t know how practical it is to program exclusively in XAML from beginning to end.</p>
<p style="text-align: left;">Another huge difference between Silverlight/Blend and Flash/ActionScript is programming interactivity. Flash makes great animations. But in order to wire up some interactivity with elements on the stage, you simply must learn and apply some actionscript. Not so with Blend. Using Behaviors from the toolbars in Blend, you can apply actions and animations based on inputs from the user &#8230; no coding necessary. I&#8217;m not an expert in Flash, but I don&#8217;t think that&#8217;s possible without actionscript.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.dongarber.com%2Fblog%2F2010%2F09%2Fsilverlight-calculator-app-tutorial%2F&amp;title=Silverlight%20Calculator%20App%20Tutorial" id="wpa2a_18"><img src="http://www.dongarber.com/blog/wp-content/plugins/add-to-any/share_save_256_24.png" width="256" height="24" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.dongarber.com/blog/2010/09/silverlight-calculator-app-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ActionScript Dice Roller Application2</title>
		<link>http://www.dongarber.com/blog/2010/09/actionscript-dice-roller-application2/</link>
		<comments>http://www.dongarber.com/blog/2010/09/actionscript-dice-roller-application2/#comments</comments>
		<pubDate>Tue, 07 Sep 2010 02:23:15 +0000</pubDate>
		<dc:creator>DonnieG</dc:creator>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[beginner]]></category>
		<category><![CDATA[random number]]></category>

		<guid isPermaLink="false">http://www.dongarber.com/blog/?p=32</guid>
		<description><![CDATA[Before I introduce this little project we worked on during the second week of my flash application development program, let me ask you: Is rolling a pair of dice just getting to be too strenuous for you? Want to impress your RISK® game playing clan? Whip out your own computerized dice roll simulator! I make [...]]]></description>
			<content:encoded><![CDATA[<p>Before I introduce this little project we worked on during the second week of my flash application development program, let me ask you: Is rolling a pair of dice just getting to be too strenuous for you? Want to impress your RISK® game playing clan? Whip out your own computerized dice roll simulator!</p>
<p>I make light of this program functionality, but in essence, it is a great introduction to a few important Flash concepts: the random number generator, Dynamic Text, and gotoAndStop functionality.</p>
<p>Here&#8217;s the fully functioning Flash application in all its glory:</p>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="200" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.dongarber.com/blog/wp-content/uploads/2010/09/diceGame_complete.swf" /><embed type="application/x-shockwave-flash" width="400" height="200" src="http://www.dongarber.com/blog/wp-content/uploads/2010/09/diceGame_complete.swf"></embed></object></p>
<p style="text-align: center;">
<p>Let&#8217;s dissect how it works, shall we? Begin!</p>
<p>Here&#8217;s the actionscript in its entirety:</p>
<pre style="padding-left: 30px;">rollButton.addEventListener(MouseEvent.MOUSE_DOWN, rollDice);</pre>
<pre style="padding-left: 30px;">function rollDice(evt:MouseEvent):void{</pre>
<pre style="padding-left: 30px;">//random number generator</pre>
<pre style="padding-left: 30px;">//you can have x number of dice rollx is to be specified.</pre>
<pre style="padding-left: 30px;">var roll1:int = Math.floor(Math.random()*6)+1;</pre>
<pre style="padding-left: 30px;">var roll2:int = Math.floor(Math.random()*6)+1;</pre>
<pre style="padding-left: 30px;">//numerical display of dice roll</pre>
<pre style="padding-left: 30px;">roll_txt.text = roll1+ roll2;</pre>
<pre style="padding-left: 30px;">//these following lines control the graphical display of the dice spots</pre>
<pre style="padding-left: 30px;">die1.gotoAndStop(roll1);</pre>
<pre style="padding-left: 30px;">die2.gotoAndStop(roll2);</pre>
<pre style="padding-left: 30px;">}</pre>
<p>We first start with a Flash stage sized 465 x 185 px and give it a nice felt green color. Then, labeling the first layer &#8216;graphics&#8217; we drag out the three common graphics; the title icon, the button and the text background where the dice roll will be indicated numerically:</p>
<p><img class="aligncenter size-medium wp-image-38" title="dicegame1" src="http://www.dongarber.com/blog/wp-content/uploads/2010/09/dicegame1-300x142.jpg" alt="" width="300" height="142" /></p>
<p>I also use the Align window to position the title graphic at the center of the top of the stage. First bit of actionscript is to make an event listener:</p>
<pre style="padding-left: 30px;">roll_btn.addEventListener(MouseEvent.MOUSE_DOWN, rollDice);</pre>
<p>This indicates that the roll button has been named (given an instance name) of roll_btn. And we will create a function called rollDice. Let&#8217;s look at how that works:</p>
<pre style="padding-left: 30px;">var roll1:int = Math.floor(Math.random()*6)+1;</pre>
<p>We assign variable name roll1 to get a random number for us. Random numbers that Flash generates are really numbers 0 through 1. Dice aren&#8217;t exactly in that format, are they? So we will have to tailor the built in randomization to generate some output that simulates die roll. For our example, we&#8217;re using standard 6-sided die, but the beauty of this program is that you could generate a program that can be used for Dungeons &amp; Dragons type games that sometimes utilize 20-sided die. Math.random() gets us started. Notice that we declare the roll1 variable as an integer, meaning a whole number.</p>
<p>(Useless Trivia Spoiler alert: so it turns out that the random() method is not actually random at all. The number generated is based on the time in milliseconds that the random() method is being called. Tricky. This nugget of information comes to us from the book The Essential Guide to Flash CS4 with ActionScript published by Friends of ED, by Paul Milbourne, Chris Kaplan, et al, page 260.)</p>
<p>Multiplying the random number method by a maximum parameter we specify will return the top range, for our purposes here, the top range, the highest roll possible on one die is 6. Ah. But what if the random number generated is zero? No such die roll is possible. So to ensure that zero is removed from our list of possible random numbers, we must add 1 to the result.</p>
<p>We&#8217;ve got two dice so we need to call two separate functions for the dice. Thus,</p>
<pre style="padding-left: 30px;">var roll1:int = Math.floor(Math.random()*6)+1;</pre>
<pre style="padding-left: 30px;">var roll2:int = Math.floor(Math.random()*6)+1;</pre>
<p>We make a text box that will display our roll, so we don&#8217;t have to subject our poor users to slow arithmetic themselves. Here&#8217;s how that&#8217;s done:</p>
<pre style="padding-left: 30px;">roll_txt.text = roll1+ roll2;</pre>
<p>Here&#8217;s where Dynamic Text enters our script. Using the Text tool in flash, we create a little text window where we want the dice roll to be numerically displayed:</p>
<p><a href="http://www.dongarber.com/blog/wp-content/uploads/2010/09/dicerollertext.jpg"><img class="alignnone size-medium wp-image-40" title="dicerollertext" src="http://www.dongarber.com/blog/wp-content/uploads/2010/09/dicerollertext-300x158.jpg" alt="" width="300" height="158" /></a></p>
<p>My yellow highlight shows that you&#8217;d select Dynamic from the pulldown of text type options. This makes it respond to our scripting, once we give it an instance name of roll_txt.</p>
<p>Now, I&#8217;m not entirely sure how the last part of the script works, but here&#8217;s the code showing how to display graphically the dice spots (pips?) that correspond to the random number generator.</p>
<pre style="padding-left: 30px;">die1.gotoAndStop(roll1);</pre>
<pre style="padding-left: 30px;">die2.gotoAndStop(roll2);</pre>
<p><a href="http://www.dongarber.com/blog/wp-content/uploads/2010/09/dicerollpips.jpg"><img class="alignnone size-medium wp-image-39" title="dicerollpips" src="http://www.dongarber.com/blog/wp-content/uploads/2010/09/dicerollpips-300x260.jpg" alt="" width="300" height="260" /></a></p>
<p>This image shows me being ambitious and adding a third die. But see the playhead is positioned on frame 5, and the die image has 5 pips on it? I believe this is what die1.gotoAndStop(roll1); is all about. If roll1 = 5 then the script would see this line as die1.gotoAndStop(5) so gotoAndStop must be some frame-related command.</p>
<p>Extra Credit:</p>
<p>On my own, for fun, and since I don&#8217;t see the term Snake Eyes enough in my day, I thought I&#8217;d try to have a custom message print in an additional little window when the dice roll was something particular. The text field was made Dynamic and given the instance name label_txt. I then simply added some scripting code and now it&#8217;s an Extra Special Dice Rolling simulator!</p>
<p style="text-align: center;"><object style="width: 400px; height: 200px;" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="200" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.dongarber.com/blog/wp-content/uploads/2010/09/diceGame_extended_work.swf" /><embed style="width: 400px; height: 200px;" type="application/x-shockwave-flash" width="400" height="200" src="http://www.dongarber.com/blog/wp-content/uploads/2010/09/diceGame_extended_work.swf"></embed></object></p>
<pre style="padding-left: 30px;">roll_btn.addEventListener(MouseEvent.MOUSE_DOWN, rollDice);</pre>
<pre style="padding-left: 30px;">function rollDice(evt:MouseEvent):void{</pre>
<pre style="padding-left: 30px;">label_txt.text = ""; //this clears any preexisting roll label from the previous round</pre>
<pre style="padding-left: 30px;">//random number generator</pre>
<pre style="padding-left: 30px;">var roll1:int = Math.floor(Math.random()*6)+1;</pre>
<pre style="padding-left: 30px;">var roll2:int = Math.floor(Math.random()*6)+1;</pre>
<pre style="padding-left: 30px;">roll_txt.text = roll1+ roll2;</pre>
<pre style="padding-left: 30px;">die1.gotoAndStop(roll1);</pre>
<pre style="padding-left: 30px;">die2.gotoAndStop(roll2);</pre>
<pre style="padding-left: 30px;">if ((roll1 == 1 ) &amp;&amp; (roll2 ==1)) {</pre>
<pre style="padding-left: 30px;">label_txt.text = "Snake Eyes!"</pre>
<pre style="padding-left: 30px;">}</pre>
<pre style="padding-left: 30px;">if ((roll1 == 6 ) &amp;&amp; (roll2 ==6)) {</pre>
<pre style="padding-left: 30px;">label_txt.text = "BoxCars!"</pre>
<pre style="padding-left: 30px;">}</pre>
<pre style="padding-left: 30px;">if ((roll1 == 3 ) &amp;&amp; (roll2 ==3)) {</pre>
<pre style="padding-left: 30px;">label_txt.text = "Six da hard way!"</pre>
<pre style="padding-left: 30px;">}</pre>
<pre style="padding-left: 30px;">if ((roll1 == 4 ) &amp;&amp; (roll2 ==4)) {</pre>
<pre style="padding-left: 30px;">label_txt.text = "Eight da hard way!"</pre>
<pre style="padding-left: 30px;">}</pre>
<pre style="padding-left: 30px;">if (roll1 + roll2 == 3) {</pre>
<pre style="padding-left: 30px;">label_txt.text = "Crapped Out!"</pre>
<pre style="padding-left: 30px;">}</pre>
<pre style="padding-left: 30px;">}</pre>
<p>As I am wont to do, what interests me in this project is how to apply it to other types of problems or applications. Random number generation and utilization is an important ability for some Flash applications, and that&#8217;s covered here. We also have, for the first time, seen the gotoAndStop command used in conjunction with a movie clip entity. Perhaps there&#8217;s more ways to use this User input &gt; random number &gt; graphics change model that we&#8217;ve worked through in this project. Maybe a slot machine, maybe a car/color/style picker randomizer, perhaps the randomizing &#8216;engine&#8217; can be used in e-learning in some way.</p>
<p style="text-align: center;">
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.dongarber.com%2Fblog%2F2010%2F09%2Factionscript-dice-roller-application2%2F&amp;title=ActionScript%20Dice%20Roller%20Application2" id="wpa2a_20"><img src="http://www.dongarber.com/blog/wp-content/plugins/add-to-any/share_save_256_24.png" width="256" height="24" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.dongarber.com/blog/2010/09/actionscript-dice-roller-application2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

