<?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></title>
	<atom:link href="http://rhuno.com/flashblog/feed/" rel="self" type="application/rss+xml" />
	<link>http://rhuno.com/flashblog</link>
	<description></description>
	<lastBuildDate>Mon, 30 Apr 2012 21:15:01 +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>Tutorial: Flash and C++ Native Extension</title>
		<link>http://rhuno.com/flashblog/2012/04/30/tutorial-flash-and-c-native-extension/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tutorial-flash-and-c-native-extension</link>
		<comments>http://rhuno.com/flashblog/2012/04/30/tutorial-flash-and-c-native-extension/#comments</comments>
		<pubDate>Mon, 30 Apr 2012 20:35:16 +0000</pubDate>
		<dc:creator>Rhuno</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[3]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Cpp]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[how]]></category>
		<category><![CDATA[native]]></category>
		<category><![CDATA[to]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://rhuno.com/flashblog/?p=666</guid>
		<description><![CDATA[Last week I decided to look into building a native extension for AIR and was very surprised by the lack of quality resources and tutorials for doing so. I was able to find examples for Android using Java and for iOS using Objective-C, but pretty much nothing for a standard Windows C++ project. I was [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I decided to look into building a native extension for AIR and was very surprised by the lack of quality resources and tutorials for doing so.  I was able to find examples for Android using Java and for iOS using Objective-C, but pretty much nothing for a standard Windows C++ project.  I was eventually able to get things up and running by piecing together bits of information from various sources, but I thought I'd take the time to write a step-by-step tutorial on how to do this so that perhaps others will have an easier time.  In this tutorial you will create a native extension that simply adds two numbers together and returns the sum.<span id="more-666"></span></p>
<p>I'll start with a warning: this tutorial is not for the absolute beginner.  You will need the AIR/Flex SDK, Microsoft Visual Studio, familiarity with C++ coding and be comfortable creating packages via the command line.  Also, while I'm comfortable with Flash and ActionScript, I am definitely not an authority on C/C++ so there may be other (better) ways to do some things.  Of course, if you happen to be an authority on that stuff, please feel free to suggest improvements! Ok, with the initial disclaimer out of the way, let's go ahead and get our hands dirty!</p>
<h3>Setting up the C++ project</h3>
<p>To begin, you'll need to have Microsoft Visual C++ 2010; and yes, the free <a href="http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express" target="_blank">Express</a> edition is just fine.  Once you've got that installed (and any necessary updates) go ahead and open it up and start a new project.  We want to create a Win32 project so select that and give it the name <em>NativeAdd</em>.  </p>
<p><a href="http://rhuno.com/flashblog/wp-content/uploads/2012/04/1.jpg" target="_blank"><img src="http://rhuno.com/flashblog/wp-content/uploads/2012/04/1-300x207.jpg" alt="" title="1" width="300" height="207" class="aligncenter size-medium wp-image-677" /></a></p>
<p>Select Next and on the following screen, under Application Type, choose DLL (Dynamic-Link Library) and click Finish.</p>
<p><a href="http://rhuno.com/flashblog/wp-content/uploads/2012/04/2.jpg" target="_blank"><img src="http://rhuno.com/flashblog/wp-content/uploads/2012/04/2-300x254.jpg" alt="" title="2" width="300" height="254" class="aligncenter size-medium wp-image-678" /></a></p>
<p>Great!  The C++ project has been created!  The next step is to make a few changes to the code; open up dllmain.cpp and the top of the file remove the following line:</p>
<pre name="code" class="cpp">
#include "stdafx.h"
</pre>
<p>and replace it with this:</p>
<pre name="code" class="cpp">
#include &lt;Windows.h&gt;
</pre>
<p>After that, let's go to the DllMain function and remove the entire switch statement so that the only code left in the function is: return TRUE;</p>
<p>The dllmain.cpp file should now look like this:</p>
<pre name="code" class="cpp">
#include &lt;Windows.h&gt;

BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved )
{
    return TRUE;
}
</pre>
<p>Now turn your attention to NativeAdd.cpp and remove the line: #include "stdafx.h"</p>
<p>The next thing we'll do is get rid of the extra files automatically added to the project by Visual Studio.  In the solution explorer, open the Header Files folder and right click the stdafx.h file and select Remove.  Go ahead and just click remove again if you get a popup box.  Do the same to targetver.h and also stdafx.cpp in the Source Files folder. </p>
<p>The next step is to add a few files.  First, we'll add NativeAdd.h to the Header Files folder.  To do so, right click the Header Files folder and select Add > New Item.  Select Header File from the list and name it NativeAdd.h.</p>
<p>Now we'll grab some necessary files from the Flex SDK and add them to our project.  Navigate to the Flex SDK directory and enter the include directory.  You'll want to copy the FlashRuntimeExtensions.h file from there.  Go back into Visual Studio and right click the Header Files folder, select Add > Existing Item.  When the file selection dialog comes up, paste the FlashRuntimeExtensions.h and then select it.</p>
<p>We've got one more file to grab from the Flex SDK so go back to the root folder of the Flex SDK.  Navigate to lib/win and copy the FlashRuntimeExtensions.lib file.  Right click the NativeAdd project in the solution explorer and select Add > Existing Item and again paste the file in the file selection dialog box and select it to add it to the project.  If you've followed along your solution explorer should look like the image below.</p>
<p><a style="margin-left:0px; padding-left:0px;" href="http://rhuno.com/flashblog/wp-content/uploads/2012/04/4.jpg"><img src="http://rhuno.com/flashblog/wp-content/uploads/2012/04/4.jpg" alt="" title="4" width="667" height="397" class="alignleft size-full wp-image-680" style="margin-left:0px; padding-left:0px;" /></a></p>
<p>We've got just one more thing to take care of before getting into the code.  Because we removed the stdafx files, we need to tell the compiler not to look for them.  To do this, right click the project file in the solution explorer.  Select Properties to bring up the dialog box.  Choose Configuration Properties > C/C++ > Precompiled Headers.  At the top of the dialog box, change Configuration to All Configurations.  Now, in the right-most pane, change the Precompiled Header option to Not Using Precompiled Headers.  Use the image below as a guide if you need it.</p>
<p><a href="http://rhuno.com/flashblog/wp-content/uploads/2012/04/3.jpg" target="_blank"><img src="http://rhuno.com/flashblog/wp-content/uploads/2012/04/3-300x212.jpg" alt="" title="3" width="300" height="212" class="aligncenter size-medium wp-image-695" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://rhuno.com/flashblog/2012/04/30/tutorial-flash-and-c-native-extension/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MultiPlayer Flash Game with AS3MUL</title>
		<link>http://rhuno.com/flashblog/2012/04/26/multiplayer-flash-game-with-as3mul/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=multiplayer-flash-game-with-as3mul</link>
		<comments>http://rhuno.com/flashblog/2012/04/26/multiplayer-flash-game-with-as3mul/#comments</comments>
		<pubDate>Fri, 27 Apr 2012 00:52:13 +0000</pubDate>
		<dc:creator>Rhuno</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[3]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[AS3MUL]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[multi]]></category>
		<category><![CDATA[multiplayer]]></category>
		<category><![CDATA[Multiuser]]></category>
		<category><![CDATA[Player]]></category>

		<guid isPermaLink="false">http://rhuno.com/flashblog/?p=659</guid>
		<description><![CDATA[I've been seeing a lot of posts around the web the last few days about a new ActionScript 3 library, AS3MUL. The MUL stands for multiuser library. Of course this captured my interest and today I decided to play around with it. I'm pleased to say this library is really good! I was able to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://rhuno.com/flashblog/2012/04/26/multiplayer-flash-game-with-as3mul/"><img src="http://rhuno.com/flashblog/wp-content/uploads/2012/04/as3mul_logo.png" alt="as3MUL logo" title="as3mul_logo" width="300" height="100" class="aligncenter size-full wp-image-660" /></a><br />
I've been seeing a lot of posts around the web the last few days about a new ActionScript 3 library, AS3MUL.  The MUL stands for multiuser library.  Of course this captured my interest and today I decided to play around with it.  I'm pleased to say this library is really good!  I was able to get a <a href="http://www.rhuno.com/flash/mul/" target="_blank">simple multiplayer scene</a> up and running in just a couple of hours!</p>
<p>You can check out my simple demo <a href="http://www.rhuno.com/flash/mul/" target="_blank">here</a>, head to the <a href="http://multiuser.reyco1.com/blog/" target="_blank">AS3MUL website</a> to learn more about it and download the library from <a href="http://code.google.com/p/as3mul/" target="_blank">google code</a>.</p>
<p>To see actual multiplayer with the demo either have a buddy sign on with you or just open the demo page in a second browser window/tab.</p>
]]></content:encoded>
			<wfw:commentRss>http://rhuno.com/flashblog/2012/04/26/multiplayer-flash-game-with-as3mul/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>7 tips for being a better, more efficient programmer</title>
		<link>http://rhuno.com/flashblog/2012/04/23/7-tips-for-being-a-better-more-efficient-programmer/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=7-tips-for-being-a-better-more-efficient-programmer</link>
		<comments>http://rhuno.com/flashblog/2012/04/23/7-tips-for-being-a-better-more-efficient-programmer/#comments</comments>
		<pubDate>Mon, 23 Apr 2012 20:59:14 +0000</pubDate>
		<dc:creator>Rhuno</dc:creator>
				<category><![CDATA[Tricks]]></category>
		<category><![CDATA[7]]></category>
		<category><![CDATA[better]]></category>
		<category><![CDATA[efficient]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[seven]]></category>
		<category><![CDATA[steps]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://rhuno.com/flashblog/?p=650</guid>
		<description><![CDATA[I've been talking recently about working a shorter, more efficient work week and wanted to share some of the things that I've learned over the years that help make it possible. Below are seven tips that will boost your productivity at work and help you avoid headaches at home. 1 - Pen and Paper When [...]]]></description>
			<content:encoded><![CDATA[<p>I've been talking recently about working a shorter, more efficient work week and wanted to share some of the things that I've learned over the years that help make it possible.  Below are seven tips that will boost your productivity at work and help you avoid headaches at home.<span id="more-650"></span></p>
<p><strong>1 - Pen and Paper</strong><br />
When you get a new project, don't jump straight into coding.  I know it is tempting to get started right away, but take some time up front to think about the project.  Outline what possible classes you may need to write and what methods those classes should contain.  The idea here is to blueprint the project on paper before you get into coding.  </p>
<p>Once you have a nice draft down, go over the relationships between various objects and look for any potential problems that may arise during implementation.  It's a lot easier to fix these problems on paper as opposed to having to refactor a portion of your code base due to unforeseen snags.  With a solid foundation on paper, the actual coding becomes a matter of following directions as opposed to engineering on the fly.</p>
<p><strong>2 - Make a to-do list</strong><br />
Give yourself a goal each day for projects at work.  Say to yourself, "ok, today I'm going to get X done."  Write it down and then focus on just that one thing until it is complete.  All too often developers set out to accomplish a task and end up getting side-tracked with implementing numerous other features and the main task suffers as a result.  If you have a specific goal written down and find yourself working on something unrelated, it's a lot easier to drop it and get back to your main objective for the day.</p>
<p>I recommend making a to-do list a few days ahead of time so that you don't waste time in the morning trying to decide what you're going to do that day.  Without a to-do list, you don't really have a specific goal and more times than not, this will lead to a wasted day where nothing in particular gets finished.</p>
<p>If you happen to finish your to-do list for a given day early (and most of the time you will), don't get started on the next days' tasks.  Instead spend the time cleaning up the existing code, eliminating bugs or adding helpful comments.  If you start on tomorrow's tasks today your schedule will begin to fall apart and you'll find yourself wasting time again.</p>
<p><strong>3 - If you're stuck, get away from the computer</strong><br />
We've all hit problems that stump us for a while, but sitting in front of the computer screen for extended hours does little good.  At best you'll find yourself with a headache and an inelegant hacked solution based on the confines of the code you've already written.  </p>
<p>If you get stuck on something for a while the best thing you can do for yourself, and the project, is to take a bit of a break.  Get up and grab a snack or take a walk outside for ten or twenty minutes.  This will give you time to think about a real solution and how to implement it... even if that means deleting existing code.</p>
<p><strong>4 - Don't work late</strong><br />
This one goes hand-in-hand with number three.  If facing an especially difficult problem you may feel compelled to stay at work until it gets sorted out, but that's probably the worst thing you can do.  When you're working late and you're tired you will make poor decisions.  You'll end up writing sloppy, bug-riddled code just to get a half-assed solution in place.  Instead of forcing yourself to stay late and finish, go home and eat dinner; relax and come in refreshed the next day and start with a fresh approach to the problem.</p>
<p>I can't tell you how many times this has helped me out on projects.  One example is a facebook application I was working on at a web agency.  Everyone on the team was working late nearly every day and things weren't getting any better.  One night we spent an additional eight hours working on a particular feature and had it working, but it was really sloppy code.  After going home and getting some sleep, I came in the next day feeling refreshed and in about 30 minutes came up with a much cleaner and easier solution for implementing the feature.  Essentially the previous night's eight hours of work was completely useless; we deleted the code and implemented the new method before 10:00 AM.</p>
<p><strong>5 - Stop doing freelance work</strong><br />
Freelance work can be a nice secondary source of income for many of us.  However, it can also be a major source of added stress and will suck up valuable time that could be used doing something you really enjoy.  If you can afford it, I recommend dropping the freelance gigs.  Instead focus on your own projects.  Make your own mobile apps or websites or whatever it is you want to make.  You may not make as much money, but you'll probably be a lot happier.  And who knows, perhaps one of your projects will make it big!</p>
<p><strong>6 - Do a little every day</strong><br />
Sometimes just thinking of a project as a whole can be overwhelming, but you don't have to kill yourself to get your projects done.  Instead of going for marathon coding sessions on personal projects, try doing just a little each day.  Even if you set aside just one hour each evening you can still accomplish a lot; especially if you keep the other items on this list in mind.  It may take a while to finish a project, but getting those small victories will help keep you motivated from day to day and you can certainly work more if you really want to!</p>
<p>The key here is to make sure you don't take a day off because if you take one day off, you're likely to take two and so on.</p>
<p><strong>7 - KISS (Keep it simple, smarty)</strong><br />
Yes, I know most people end this with "stupid" but I don't think that makes much sense.  What's more stupid: going with a simple, straight-forward approach or over-complicating things and giving yourself unnecessary headaches?  I submit that the simple, straight-forward approach is the smarter of the two.  </p>
<p>If you find yourself writing a big mess of code thinking "there's gotta be a better way of doing this" then there probably is.  Stop what you're doing and reevaluate the problem.  Try breaking it down into simpler sub-problems and start from there.</p>
]]></content:encoded>
			<wfw:commentRss>http://rhuno.com/flashblog/2012/04/23/7-tips-for-being-a-better-more-efficient-programmer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Better Work Week</title>
		<link>http://rhuno.com/flashblog/2012/04/14/a-better-work-week/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=a-better-work-week</link>
		<comments>http://rhuno.com/flashblog/2012/04/14/a-better-work-week/#comments</comments>
		<pubDate>Sun, 15 Apr 2012 03:51:20 +0000</pubDate>
		<dc:creator>Rhuno</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[4]]></category>
		<category><![CDATA[barcamp]]></category>
		<category><![CDATA[day]]></category>
		<category><![CDATA[orlando]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[Ryan]]></category>
		<category><![CDATA[Schaefer]]></category>
		<category><![CDATA[talk]]></category>
		<category><![CDATA[week]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://rhuno.com/flashblog/?p=644</guid>
		<description><![CDATA[I had a great time today at Barcamp Orlando! I saw quite a few interesting and funny talks and was able to grab a speaking slot for my presentation on working a more efficient 4 day, 32 hour work week. It seemed to go over really well; there were some great questions and feedback from [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://rhuno.com/flashblog/wp-content/uploads/2012/04/barcamp.jpg" target="_blank"><img src="http://rhuno.com/flashblog/wp-content/uploads/2012/04/barcamp.jpg" alt="" title="barcamp" width="480" height="321" class="aligncenter size-full wp-image-645" /></a></p>
<p>I had a great time today at <a href="http://barcamporlando.org/" target="_blank">Barcamp Orlando</a>!  I saw quite a few interesting and funny talks and was able to grab a speaking slot for my presentation on working a more efficient 4 day, 32 hour work week.  It seemed to go over really well; there were some great questions and feedback from the audience.  </p>
<p>I've put the <a href="http://www.rhuno.com/flashblog/barcamporlando2012/" target="_blank">presentation online</a> if you want to look over the slides.  However, I'm not sure you'll get much out of them without the talk to give some context.  They were more or less just shorthand notes so I could remember what to talk about next.   </p>
]]></content:encoded>
			<wfw:commentRss>http://rhuno.com/flashblog/2012/04/14/a-better-work-week/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Speaking at Barcamp Orlando&#8230;maybe</title>
		<link>http://rhuno.com/flashblog/2012/04/09/speaking-at-barcamp-orlando/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=speaking-at-barcamp-orlando</link>
		<comments>http://rhuno.com/flashblog/2012/04/09/speaking-at-barcamp-orlando/#comments</comments>
		<pubDate>Tue, 10 Apr 2012 01:20:48 +0000</pubDate>
		<dc:creator>Rhuno</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[barcamp]]></category>
		<category><![CDATA[orlando]]></category>
		<category><![CDATA[rhuno]]></category>

		<guid isPermaLink="false">http://rhuno.com/flashblog/?p=637</guid>
		<description><![CDATA[This saturday, April 14, is Barcamp Orlando; a non-conference conference. What the heck does that mean? It's an all day event running 9:30 AM to 6:00 PM in downtown Orlando. There will be four rooms for speakers; the kicker is that all the speakers sign up to talk the day of the conference! I've prepared [...]]]></description>
			<content:encoded><![CDATA[<p>This saturday, April 14, is <a href="http://barcamporlando.org/" target="_blank">Barcamp Orlando</a>; a non-conference conference.  What the heck does that mean?  It's an all day event running 9:30 AM to 6:00 PM in downtown Orlando.  There will be four rooms for speakers; the kicker is that all the speakers sign up to talk the day of the conference!  I've prepared a presentation, an HTML5 slideshow no less, and will arrive early in an attempt to snag a speaking slot (no guarantees).  </p>
<p>The presentation is tentatively titled <em>A Better Work Week</em> and goes into the details about the benefits of working a 4 day, 32 hour week instead of the standard 5 day, 40 hour week.</p>
<p><a href="http://barcamporlando.org/" target="_blank"><img src="http://rhuno.com/flashblog/wp-content/uploads/2012/04/logo-barcamp.png" alt="" title="logo-barcamp" width="480" height="106" class="aligncenter size-full wp-image-638" /></a></p>
<p>This is something that I feel strongly about and I hope the idea can gain some momentum in the US.  If you're in the area please drop by and check it out!</p>
]]></content:encoded>
			<wfw:commentRss>http://rhuno.com/flashblog/2012/04/09/speaking-at-barcamp-orlando/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Aquwar updated</title>
		<link>http://rhuno.com/flashblog/2012/04/09/aquwar-updated/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=aquwar-updated</link>
		<comments>http://rhuno.com/flashblog/2012/04/09/aquwar-updated/#comments</comments>
		<pubDate>Tue, 10 Apr 2012 01:10:41 +0000</pubDate>
		<dc:creator>Rhuno</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Aquwar]]></category>
		<category><![CDATA[combat]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[underwater]]></category>

		<guid isPermaLink="false">http://rhuno.com/flashblog/?p=633</guid>
		<description><![CDATA[I spent the day adding leaderboards to one of the first Flash games I ever created, Aquwar. It's an underwater combat game where the objective is simply to survive for as long as possible, shoot enemies and rack up a high score. It's not the best game in the world, but it was a great [...]]]></description>
			<content:encoded><![CDATA[<p>I spent the day adding leaderboards to one of the first Flash games I ever created, Aquwar.  It's an underwater combat game where the objective is simply to survive for as long as possible, shoot enemies and rack up a high score.  It's not the best game in the world, but it was a great learning experience for me at the time and I had a lot of fun making it.  </p>
<p><a href="http://www.newgrounds.com/portal/view/593470" target="_blank"><img src="http://rhuno.com/flashblog/wp-content/uploads/2012/04/aquwarTitle.jpg" alt="" title="aquwarTitle" width="541" height="318" class="aligncenter size-full wp-image-634" /></a></p>
<p>You can play the game now on <a href="http://www.newgrounds.com/portal/view/593470" target="_blank">Newgrounds</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://rhuno.com/flashblog/2012/04/09/aquwar-updated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jury Duty updated on Android</title>
		<link>http://rhuno.com/flashblog/2012/04/02/jury-duty-updated-on-android/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=jury-duty-updated-on-android</link>
		<comments>http://rhuno.com/flashblog/2012/04/02/jury-duty-updated-on-android/#comments</comments>
		<pubDate>Mon, 02 Apr 2012 17:02:41 +0000</pubDate>
		<dc:creator>Rhuno</dc:creator>
				<category><![CDATA[mobile]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://rhuno.com/flashblog/?p=627</guid>
		<description><![CDATA[I just pushed a new version of my Jury Duty application to the Android marketplace. The new version, 1.23, includes a fix for a bug that was causing text to get cut off from longer content pieces in the history portion of the app. If you're an Android user, grab the new version from the [...]]]></description>
			<content:encoded><![CDATA[<p>I just pushed a new version of my <a href="https://play.google.com/store/apps/details?id=air.com.ryanschaefer.JuryDuty&feature=search_result" target="_blank">Jury Duty</a> application to the Android marketplace.  The new version, 1.23, includes a fix for a bug that was causing text to get cut off from longer content pieces in the history portion of the app.  If you're an Android user, grab the <a href="https://play.google.com/store/apps/details?id=air.com.ryanschaefer.JuryDuty&feature=search_result" target="_blank">new version</a> from the play store now!</p>
<p><a href="https://play.google.com/store/apps/details?id=air.com.ryanschaefer.JuryDuty&feature=search_result" target="_blank"><img src="http://rhuno.com/flashblog/wp-content/uploads/2012/04/JDLogo.png" alt="" title="JDLogo" width="124" height="124" class="aligncenter size-full wp-image-629" /></a></p>
<p>As for iOS, I will also be making an update there in the next couple of weeks.  It takes a lot longer to get stuff published with Apple.</p>
]]></content:encoded>
			<wfw:commentRss>http://rhuno.com/flashblog/2012/04/02/jury-duty-updated-on-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The truth about the premium features for Flash</title>
		<link>http://rhuno.com/flashblog/2012/03/28/the-truth-about-the-premium-features-for-flash/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-truth-about-the-premium-features-for-flash</link>
		<comments>http://rhuno.com/flashblog/2012/03/28/the-truth-about-the-premium-features-for-flash/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 02:53:34 +0000</pubDate>
		<dc:creator>Rhuno</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[premium]]></category>
		<category><![CDATA[ugh]]></category>

		<guid isPermaLink="false">http://rhuno.com/flashblog/?p=621</guid>
		<description><![CDATA[Today was a pretty hectic day in the industry. After Adobe announced a new premium license for Flash Player; the internet, in typical internet fashion, went ballistic over pretty much nothing. If you want to see what all the ruckus is about, you can read the official announcement here. I'm really going to hope that [...]]]></description>
			<content:encoded><![CDATA[<p>Today was a pretty hectic day in the industry.  After Adobe announced a new premium license for Flash Player; the internet, in typical internet fashion, went ballistic over pretty much nothing.  If you want to see what all the ruckus is about, you can read the official announcement <a href="http://www.adobe.com/devnet/flashplayer/articles/premium-features.html" target="_blank">here</a>.  I'm really going to hope that when you're done reading that, you realize there's nothing to get riled up about.  </p>
<p>The 9% fee from the premium license applies only to Flash Player-based games that utilize both Stage3D and Alchemy.  Furthermore, it only comes into effect if said game manages to pull in $50,000 or more in revenue.  Anything packaged with AIR is exempt.  This means anything you do for mobile does not require a fee.</p>
<p>I've been developing with Flash for quite a while now and nothing I've ever built has met the requirements for paying the 9% fee.  And perhaps more to the point, nothing I plan on building in the future would incur a fee either.  </p>
<p>Unless you're a major game developer (think EA) it's pretty safe to assume this announcement does not apply to you or any Flash projects you're planning on building.  </p>
<p>As <a href="http://www.photonstorm.com/" target="_blank">Richard Davey</a> said on Twitter: "<em>All everyone will take-away is the '9%' headline and ignore the fact it applies to not one single game yet</em>"</p>
<p>HTML5 and Apple zealots will likely continue to make a big scene about this, but hopefully now you understand that this is really not a big deal and perhaps cooler heads will prevail.  For another voice on the matter, check out Lee Brimelow's recent <a href="http://www.leebrimelow.com/?p=3297" target="_blank">post</a> in which he explains the situation.</p>
]]></content:encoded>
			<wfw:commentRss>http://rhuno.com/flashblog/2012/03/28/the-truth-about-the-premium-features-for-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Night of the Loving Dead</title>
		<link>http://rhuno.com/flashblog/2012/03/18/night-of-the-loving-dead/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=night-of-the-loving-dead</link>
		<comments>http://rhuno.com/flashblog/2012/03/18/night-of-the-loving-dead/#comments</comments>
		<pubDate>Sun, 18 Mar 2012 16:44:24 +0000</pubDate>
		<dc:creator>Rhuno</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Dead]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flixel]]></category>
		<category><![CDATA[Loving]]></category>
		<category><![CDATA[Night]]></category>

		<guid isPermaLink="false">http://rhuno.com/flashblog/?p=616</guid>
		<description><![CDATA[I'm pleased to announce the release of my first Flash game of the year: Night of the Loving Dead. I've spent the last couple months creating this game and am overall pretty happy with it. It also represents my first Flixel-based project and I was really impressed with the Flixel engine. Give it a shot [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.kongregate.com/games/Rhuno/night-of-the-loving-dead" target="_blank"><img src="http://rhuno.com/flashblog/wp-content/uploads/2012/03/title.png" alt="" title="title" width="320" height="240" class="aligncenter size-full wp-image-617" /></a></p>
<p>I'm pleased to announce the release of my first Flash game of the year: <a href="http://www.kongregate.com/games/Rhuno/night-of-the-loving-dead" target="_blank">Night of the Loving Dead</a>.  </p>
<p>I've spent the last couple months creating this game and am overall pretty happy with it.  It also represents my first Flixel-based project and I was really impressed with the Flixel engine.  Give it a shot and let me know what you think!</p>
]]></content:encoded>
			<wfw:commentRss>http://rhuno.com/flashblog/2012/03/18/night-of-the-loving-dead/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial: WebRTC with HTML5 and Javascript</title>
		<link>http://rhuno.com/flashblog/2012/03/11/tutorial-webrtc-with-html5-and-javascript/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tutorial-webrtc-with-html5-and-javascript</link>
		<comments>http://rhuno.com/flashblog/2012/03/11/tutorial-webrtc-with-html5-and-javascript/#comments</comments>
		<pubDate>Mon, 12 Mar 2012 02:35:26 +0000</pubDate>
		<dc:creator>Rhuno</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[webcam]]></category>
		<category><![CDATA[webRTC]]></category>

		<guid isPermaLink="false">http://rhuno.com/flashblog/?p=583</guid>
		<description><![CDATA[WebRTC is a new technology that brings real-time communication capabilities to your browser without the need for plugins. In this tutorial you'll learn how to set up a webcam stream and copy images from it to an HTML5 canvas element. The first thing you need to know about this technology is that it is not [...]]]></description>
			<content:encoded><![CDATA[<p>WebRTC is a new technology that brings real-time communication capabilities to your browser without the need for plugins.  In this tutorial you'll learn how to set up a webcam stream and copy images from it to an HTML5 canvas element.<span id="more-583"></span></p>
<link rel="image_src" href="http://rhuno.com/flashblog/wp-content/uploads/2012/03/webrtc.png" />
<p>The first thing you need to know about this technology is that it is not readily available just yet.  To get this to work, you'll need to download the developer build of Google Chrome, called <a href="http://tools.google.com/dlpage/chromesxs" target="_blank">Canary</a>.  Once Canary is installed, open it up and type "about:flags" in the address bar.  Find the MediaStream option and click Enable; you'll need to close and reopen the browser for this change to take effect.  </p>
<p><a href="http://rhuno.com/flashblog/wp-content/uploads/2012/03/mediaStreamFlag.jpg" target="_blank"><img src="http://rhuno.com/flashblog/wp-content/uploads/2012/03/mediaStreamFlag-300x142.jpg" alt="" title="mediaStreamFlag" width="300" height="142" class="aligncenter size-medium wp-image-601" /></a></p>
<p>To test if it's working (and to preview what we will be building here), use Canary and <a href="http://www.rhuno.com/camera/webrtcTest.html" target="_blank">head here</a> to see if the stream comes through.  Note that you will be prompted to allow access to your camera.</p>
<p>With MediaStream enabled, we can now move onto the code.  We'll begin by laying out a simple HTML file.</p>
<pre name="code" class="html">
&lt;!DOCTYPE html&gt;

&lt;html&gt;

    &lt;head&gt;
        &lt;title&gt;webRTC Test&lt;/title&gt;
    &lt;/head&gt;

    &lt;script type="text/javascript"&gt;

    &lt;/script&gt;

    &lt;body onload="init();" style="background-color:#ababab;" &gt;
        &lt;div style="width:352px; height:625px; margin:0 auto; background-color:#fff;" &gt;
            &lt;div&gt;
	            &lt;video id="camFeed" autoplay&gt;
		        &lt;/video&gt;
	        &lt;/div&gt;

            &lt;div&gt;
                &lt;canvas id="photo" width="352" height="288"&gt;
                &lt;/canvas&gt;
            &lt;/div&gt;

            &lt;div style="margin:0 auto; width:82px;"&gt;
                &lt;input type="button" value="Take Photo" onclick="takePhoto();"&gt;
            &lt;/div&gt;
        &lt;/div&gt;

    &lt;/body&gt;
&lt;/html&gt;
</pre>
<p>As you can see, we've got a fairly standard HTML document here.  At the top we've got an empty script block which we'll be filling out in just a bit.  I've just inlined the css styles for this example because there isn't much to it.  When the body tag loads, it will call a function, init, which we haven't written just yet.  The init function will be responsible for determining if the user's browser supports webRTC or not.</p>
<p>Within the body we've got a simple wrapper div that holds all the content.  Inside there we have another div that contains a video tag.  The video tag is where the webcam feed will be rendered.</p>
<p>Following the div containing the video tag is another div.  This one holds a canvas element.  This canvas element is where we will display the photo that gets taken.  It is important to note that I set the width and height attributes of this tag directly and not through css.  This is because HTML5 will actually scale and stretch a canvas element when the width and height are set using css.  Some people think this is a nice feature; I just think it's stupid, but that's how it is.</p>
<p>You may also have noticed that the width and height of the canvas element are a bit random (352, 288).  I came up with those values after seeing the webcam feed was being rendered at that size in the video tag.  You may need to adjust these values according to your camera.</p>
<p>After closing the div containing the canvas element, we create one more div.  This one holds a standard button that when clicked will call a javascript function, takePhoto.  This method will be responsible for rendering the photo in the canvas element.</p>
<p>It is now time to get to the javascript.  Add the following code inside the empty script block we created above.</p>
<pre name="code" class="jscript">
function init()
{
    if(navigator.webkitGetUserMedia)
    {
        navigator.webkitGetUserMedia('video', onSuccess, onFail);
    }
    else
    {
        alert('webRTC not available');
    }
}

function onSuccess(stream)
{
    document.getElementById('camFeed').src = webkitURL.createObjectURL(stream);
}

function onFail()
{
    alert('could not connect stream');
}
</pre>
<p>There really isn't a whole lot to it.  In the init function we first check to see that the browser supports webRTC.  If not, we throw up an alert letting the user know that it is not supported.  If it is, we use a call to webkitGetUserMedia to get things going.  We tell it we're using video and then give it a function to call upon successful stream creation and another to call if it fails.  </p>
<p>Note that the webkit vendor prefix may or may not be necessary depending the browser (Opera, for example).  Once standardized, the method should become just: getUserMedia.  However, it isn't there yet and because we're using Canary, we need it.</p>
<p>In the onFail function, we just send an alert to the user letting them know that something went wrong and we were unable to connect a stream to the video tag.  In onSuccess, we receive a stream as an argument.  We then create an object URL for the stream and apply it to the src property of our video tag.  </p>
<p>We're just about done now.  All that's left to do is write the takePhoto function to copy an image to the canvas element.  Add the following method just after the onFail function we created above.</p>
<pre name="code" class="jscript">
function takePhoto()
{
    var c = document.getElementById('photo');
    var v = document.getElementById('camFeed');
    c.getContext('2d').drawImage(v, 0, 0);
}
</pre>
<p>It's that easy!  We just grab a reference to our canvas tag and also to our video tag.  We then get a 2D rendering context from the canvas and call the drawImage function.  We tell it what to draw, the video element, and where to draw it (0,0).</p>
<p>That's it; we're done.  This works...but probably not if you try running it locally!  This is due to a security restriction in Canary.  You can push the file to a web server and it should run fine as long as you enabled the MediaStream flag earlier (with Canary).  When you navigate to the page you should be prompted to allow access to your camera.  Obviously you should allow it if you want to see this working!</p>
<p>If you don't have access to a web server, don't worry, you can still run the file locally too.  You just have to run Canary with another flag set: --allow-file-access-from-files.  You can do this by opening a command prompt window and navigating to the directory where Canary was installed.  On my Windows 7 machine, the command looks like this:</p>
<p>cd C:\Users\USERNAME\AppData\Local\Google\Chrome SxS\Application</p>
<p>Then just launch the canary exe with the following command:</p>
<p>chrome.exe --allow-file-access-from-files</p>
<p>When you open the file locally, you'll know it's not going to work if you see: "null wants to use your camera."  If instead you see "file:// wants to use your camera" you're in good shape.</p>
<p>It's worth pointing out that while this functionality is new to Chrome, it was actually available <a href="http://dev.opera.com/articles/view/playing-with-html5-video-and-getusermedia-support/" target="_blank">last year</a> in Opera's development browser.</p>
<p>That's all there is to it; I hope you had fun with this tutorial and I encourage you to keep an eye on webRTC in the future.  I imagine it should be readily available on all major browsers by the year's end, but we'll have to wait and see.</p>
]]></content:encoded>
			<wfw:commentRss>http://rhuno.com/flashblog/2012/03/11/tutorial-webrtc-with-html5-and-javascript/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

