<?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>Nate Beck &#187; Actionscript</title>
	<atom:link href="http://blog.natebeck.net/category/actionscript/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.natebeck.net</link>
	<description>AIR, Flex / Flash, FMS, PushButton, Game... Developer</description>
	<lastBuildDate>Wed, 07 Sep 2011 21:24:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Tip of the Day – Getting a SWF&#8217;s background color</title>
		<link>http://blog.natebeck.net/2010/12/tip-of-the-day-getting-a-swfs-background-color/</link>
		<comments>http://blog.natebeck.net/2010/12/tip-of-the-day-getting-a-swfs-background-color/#comments</comments>
		<pubDate>Thu, 30 Dec 2010 11:03:31 +0000</pubDate>
		<dc:creator>Nate Beck</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Tip of the day]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[ZaaLabs]]></category>

		<guid isPermaLink="false">http://blog.natebeck.net/?p=1193</guid>
		<description><![CDATA[Recently at ZaaLabs, I&#8217;ve been working on a really cool tooling platform called Eden. One of the features that Eden has is a Screen Capture plugin. Eden can send a request to a remote SWF to return a bitmap of the stage. For example, here is Eden pulling a screen capture from HanClinto&#8217;s Platformer Starter]]></description>
			<content:encoded><![CDATA[<p>Recently at <a href="http://www.zaalabs.com">ZaaLabs</a>, I&#8217;ve been working on a really cool tooling platform called Eden. One of the features that Eden has is a Screen Capture plugin. Eden can send a request to a remote SWF to return a bitmap of the stage.</p>
<p>For example, here is Eden pulling a screen capture from <a href="http://www.hanclinto.com">HanClinto&#8217;s Platformer Starter Kit</a>.</p>
<p><a href="http://blog.natebeck.net/wp-content/uploads/2010/12/ScreenCap.png" target="_blank"><img width="600" src="http://blog.natebeck.net/wp-content/uploads/2010/12/ScreenCap.png" /></a></p>
<p>Really cool! However, I quickly ran into an issue when I tried to take a screen capture of a more basic game.</p>
<p>On the right is the game running in Flash, and on the left is the screen capture.</p>
<p><a href="http://blog.natebeck.net/wp-content/uploads/2010/12/ScreenCapNoBg.png" target="_blank"><img width="600" src="http://blog.natebeck.net/wp-content/uploads/2010/12/ScreenCapNoBg.png" /></a></p>
<p>As you can see, my screen capture doesn&#8217;t include the green background.  So what happened?</p>
<p>Well it turns out the background color of a SWF isn&#8217;t actually part of the stage.  The background color that you set using the SWF Metadata tag, or set in Flash Professional is drawn directly by Flash Player.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package
<span style="color: #66cc66;">&#123;</span>	
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
&nbsp;
	<span style="color: #66cc66;">&#91;</span>SWF<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">backgroundColor</span>=<span style="color: #ff0000;">&quot;0x00FF00&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span> <span style="color: #808080; font-style: italic;">// &lt;--- How can I get this programmatically?</span>
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> SwfBackgroundExample <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> SwfBackgroundExample<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>So I had a dilemma&#8230; how could I access the backgroundColor of the SWF?  I scoured the API docs, I asked the Twitter-sphere, but no luck.  All I learned was that the backgroundColor was hard coded into the bytes of the SWF.  So I decided that&#8217;s where I needed to look for it.</p>
<h3>SwfData to the rescue.</h3>
<p>I read up on the <a href="http://www.adobe.com/content/dam/Adobe/en/devnet/swf/pdf/swf_file_format_spec_v10.pdf">Adobe SWF specification</a>, and consulted with my good friend <a href="http://www.jamesward.com/">James Ward</a>.  He pointed me in the direction of loaderInfo.bytes, which gives us access to the bytes of the currently running SWF.</p>
<p>After a few hours, I had a fun little class I like to call SwfData, which parsed the background color out of the currently running SWF&#8217;s bytes&#8230; as well as some other fun things.  Here&#8217;s how you use it:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">zaalabs</span>.<span style="color: #006600;">utils</span>.<span style="color: #006600;">SwfData</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
&nbsp;
	<span style="color: #66cc66;">&#91;</span>SWF<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">backgroundColor</span>=<span style="color: #ff0000;">&quot;0x969696&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> SwfDataExample <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> SwfDataExample<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">data</span>:SwfData = <span style="color: #000000; font-weight: bold;">new</span> SwfData<span style="color: #66cc66;">&#40;</span>loaderInfo.<span style="color: #006600;">bytes</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;version <span style="color: #000099; font-weight: bold;">\t</span>&quot;</span>+<span style="color: #0066CC;">data</span>.<span style="color: #0066CC;">version</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;frameRate <span style="color: #000099; font-weight: bold;">\t</span>&quot;</span>+<span style="color: #0066CC;">data</span>.<span style="color: #006600;">frameRate</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;frameCount <span style="color: #000099; font-weight: bold;">\t</span>&quot;</span>+<span style="color: #0066CC;">data</span>.<span style="color: #006600;">frameCount</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;fileLength <span style="color: #000099; font-weight: bold;">\t</span>&quot;</span>+<span style="color: #0066CC;">data</span>.<span style="color: #006600;">fileLength</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;bgColor <span style="color: #000099; font-weight: bold;">\t</span>0x&quot;</span>+<span style="color: #0066CC;">data</span>.<span style="color: #0066CC;">backgroundColor</span>.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">16</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Using SwfData, I could now use the background color as the fill color of my BitmapData class.</p>
<p><a href="http://blog.natebeck.net/wp-content/uploads/2010/12/ScreenCapWBg.png" target="_blank"><img width="600" src="http://blog.natebeck.net/wp-content/uploads/2010/12/ScreenCapWBg.png" /></a></p>
<h3>Get It Here</h3>
<p>SwfData is <a href="https://github.com/ZaaLabs/ZaaUtils/blob/master/license.txt">MIT licensed</a> under ZaaUtils (do with it what you will).  It is <a href="https://github.com/ZaaLabs/ZaaUtils">available on GitHub</a></p>
<p>Questions, comments, complaints are all welcome below.</p>
<h3>== UPDATE ==</h3>
<p>So I just found out that <a href="http://wahlers.com.br/claus/blog/">Claus Wahlers</a> has an awesome, more feature complete version of an AS3 SWF parser.  It&#8217;s also <a href="https://github.com/claus/as3swf/blob/master/src/com/codeazur/as3swf/SWF.as">available on GitHub</a>.  I&#8217;m still going to keep SwfData up since it&#8217;s much more specific to getting the background color of the swf.  If you need more features, use as3swf by Claus, it&#8217;s very well done.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.natebeck.net/2010/12/tip-of-the-day-getting-a-swfs-background-color/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>RIARadio, GangstaCast, TheFlexShow and Tech News Today&#8230;</title>
		<link>http://blog.natebeck.net/2010/07/riaradio-gangstacast-theflexshow-and-tech-news-today/</link>
		<comments>http://blog.natebeck.net/2010/07/riaradio-gangstacast-theflexshow-and-tech-news-today/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 19:01:00 +0000</pubDate>
		<dc:creator>Nate Beck</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[PushButton]]></category>
		<category><![CDATA[ZaaLabs]]></category>
		<category><![CDATA[Flex Show]]></category>
		<category><![CDATA[GangstaCast]]></category>
		<category><![CDATA[Podcasts]]></category>
		<category><![CDATA[RIARadio]]></category>
		<category><![CDATA[Tech New Today]]></category>
		<category><![CDATA[TWiT]]></category>

		<guid isPermaLink="false">http://blog.natebeck.net/?p=1182</guid>
		<description><![CDATA[Recently I&#8217;ve had the opportunity to participate in a few podcasts, and they all seem to have come out this week. Check them out: The Flex Show &#8211; Episode 115 RIARadio &#8211; Episode 17 GangstaCast Episode 1: Celebrity Stalker Edition Also, I was thrilled to find out that I was mentioned on TWiT.tv&#8217;s Tech News]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve had the opportunity to participate in a few podcasts, and they all seem to have come out this week.  Check them out:
<p><a href="http://www.theflexshow.com/blog/index.cfm/2010/7/21/Pushbutton-Engine-with-Ben-Garney-and-Nate-Beck-The-Flex-Show-Episode-115">The Flex Show &#8211; Episode 115</a></p>
<p><a href="http://insideria.com/2010/07/riaradio-episode-17-episode-17.html">RIARadio &#8211; Episode 17</a></p>
<p><a href="http://www.flexgangsta.com/?p=54">GangstaCast Episode 1: Celebrity Stalker Edition</a></p>
<p>Also, I was thrilled to find out that I was mentioned on TWiT.tv&#8217;s Tech News Today for an article I wrote regarding tracking celebrities by scraping exif data from photos uploaded to TwitPic, yfrog, TweetPhoto and TwitGoo. &nbsp;The part when they talk about the article is about 15 minutes into the episode.</p>
<p><a href="http://www.twit.tv/tnt34">Tech News Today 34: Take Off Your Pants, America</a></p>
<p><a href="http://www.zaalabs.com/2010/07/finding-celebrity-locations-via-twitter/">Article on ZaaLabs</a></p>
<p>So all in all, it&#8217;s been a very interesting week.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.natebeck.net/2010/07/riaradio-gangstacast-theflexshow-and-tech-news-today/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Load 40 image formats into Flash. Oh, and it&#8217;s open source.</title>
		<link>http://blog.natebeck.net/2010/04/load-40-image-formats-into-flash-oh-and-its-open-source/</link>
		<comments>http://blog.natebeck.net/2010/04/load-40-image-formats-into-flash-oh-and-its-open-source/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 23:42:10 +0000</pubDate>
		<dc:creator>Nate Beck</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[ZaaLabs]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[ZaaIL]]></category>

		<guid isPermaLink="false">http://blog.natebeck.net/?p=986</guid>
		<description><![CDATA[For for those who don&#8217;t know, I&#8217;m one of two people behind ZaaLabs (the other being Aaron Boushley). Today we released ZaaIL, an Adobe Alchemy port of DevIL an open source C image library. Built in image support of Adobe Flash Player limits you to 3 image formats: gif, jpg and png. While this has]]></description>
			<content:encoded><![CDATA[<p>For for those who don&#8217;t know, I&#8217;m one of two people behind <a href="http://www.zaalabs.com">ZaaLabs</a> (the other being <a href="http://www.twitter.com/boushley">Aaron Boushley</a>).  Today we released ZaaIL, an <a href="http://labs.adobe.com/technologies/alchemy/">Adobe Alchemy</a> port of <a href="http://openil.sourceforge.net/">DevIL</a> an open source C image library.</p>
<p>Built in image support of Adobe Flash Player limits you to 3 image formats: gif, jpg and png.  While this has worked well for many, many years&#8230; I recently have needed to expand the types of formats that I could use in Flash Player.  I should also note that you can absolutely add support for these formats directly in ActionScript using ByteArray.  For example Mike Chambers blogged about an <a href="http://www.mikechambers.com/blog/2009/09/17/parsing-and-displaying-bmp-files-via-actionscript/">AS3 BMP parser</a>.</p>
<p>I was originally looking for support for TGA, BMP and PSD, when my friend Ben pointed me to DevIL and challenged me to port it using Alchemy.</p>
<p>Porting C code using Alchemy is not a very straight forward process, but between Aaron and I&#8230; and with help from <a href="http://www.coderhump.com">Ben Garney</a> and <a href="http://www.waxpraxis.org">Branden Hall</a>&#8230; worked our way through it.  We plan on a series of blog posts discussing the process of using Alchemy in detail.  Hopefully we can garner enough interest in the community around Alchemy to get Adobe to continue work on it.</p>
<p>ZaaIL is being released as open source software (MIT if you&#8217;re interested).  We will post it all on GitHub when we get the chance.</p>
<p><strong>[sidenote]</strong><br />
I have been asked by a few people if I think Adobe should expand from their three image formats and use something like DevIL in Flash Player&#8230; I don&#8217;t think they should.  Adobe has given us the tools to create really cool things such as ZaaIL.  I&#8217;d rather the Flash Player team focus on things I find way more important&#8230; such as 3D support, mobile performance, hardware accelerated graphics, etc&#8230;<br />
<strong>[/sidenote]</strong></p>
<p>ZaaIL allows developers to now to load more that <a href="http://www.zaalabs.com/2010/04/introducing-zaail-40-image-format-support-for-flash/">40 different image types</a>&#8230; go ahead give it a try, I particularly like using a PSD file or cover art embedded into an MP3 (<a href="http://zaalabs.com/demo/TestZaaIL/srcview/index.html">View source</a> is enabled):</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_TestZaaIL_227636286"
			class="flashmovie"
			width="600"
			height="550">
	<param name="movie" value="http://zaalabs.com/demo/TestZaaIL/TestZaaIL.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://zaalabs.com/demo/TestZaaIL/TestZaaIL.swf"
			name="fm_TestZaaIL_227636286"
			width="600"
			height="550">
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>More information can be found over at <a href="http://www.zaalabs.com">ZaaLabs</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.natebeck.net/2010/04/load-40-image-formats-into-flash-oh-and-its-open-source/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Developing games with PushButton Engine &#8211; Understanding Local Flash Player Security</title>
		<link>http://blog.natebeck.net/2010/01/developing-games-with-pushbutton-engine-understanding-local-flash-player-security/</link>
		<comments>http://blog.natebeck.net/2010/01/developing-games-with-pushbutton-engine-understanding-local-flash-player-security/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 10:58:23 +0000</pubDate>
		<dc:creator>Nate Beck</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[PushButton]]></category>
		<category><![CDATA[Tip of the day]]></category>
		<category><![CDATA[PBE]]></category>
		<category><![CDATA[PushButton Engine]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://blog.natebeck.net/?p=931</guid>
		<description><![CDATA[As I spend more and more time on the PushButton Engine Forums, it&#8217;s funny how often the same topic seems to come up. Today a topic showed up again, regarding running Flash swf files locally. You see this same topic in many different flavors&#8230; When I email my game to the client it won&#8217;t run]]></description>
			<content:encoded><![CDATA[<p>As I spend more and more time on the <a href="http://pushbuttonengine.com/forum/">PushButton Engine Forums</a>, it&#8217;s funny how often the same topic seems to come up.  Today a topic showed up again, regarding running Flash swf files locally. You see this same topic in many different flavors&#8230; </p>
<ul>
<li>When I email my game to the client it won&#8217;t run on his computer</li>
<li>Playing the game only works inside my Flash Builder (or Flex Builder) project development folder</li>
<li>My game worked perfectly in one folder, but no longer works when moved to another folder</li>
</ul>
<p>These issues are all part of the same underlying problem, a misunderstanding of Flash Player Security.</p>
<p>The first question you should ask yourself is&#8230; what <strong>security sandbox type</strong> is my game running in?</p>
<h3>What is a Sandbox Type?</h3>
<p>The sandbox type indicates the type of security zone in which the SWF file is operating.</p>
<p><b>Please remember that the security sandbox is determined at runtime, not compile time!</b></p>
<p>In the PushButton Engine we make identifying the security sandbox easy.  When your game starts it logs the security sandbox that your swf is currently running (you can also get this by using the built in &#8220;version&#8221; console command). It looks like this:</p>
<p><code>PBE - PushButton Engine - r841 (ZaaBot build #97) - flash - <strong>localTrusted</strong></code></p>
<p>In this case, the game is running in &#8220;localTrusted&#8221;.  Most games that you run from Flash Builder will run in the localTrusted sandbox type.  This is because Flash Builder configures your system to trust files in Flash Builder project directories.  This is meant to make our lives easier as Flash developers&#8230; but it can cause confusion.</p>
<p><b>You can figure out what sandbox you&#8217;re running in by checking Security.sandboxType at runtime.</b></p>
<h3>So what are the types of sandboxes?</h3>
<p>In Flash Player, all SWF files are placed into one of four types of sandbox:</p>
<p><strong>remote</strong>  All files from non-local URLs are placed in a remote sandbox. Basically anything loaded from the web (ex: http, https) falls into this category.  There is no access to the local filesystem.</p>
<p><strong>local-with-filesystem</strong>  This is the default sandbox for local files. SWF files in this sandbox may not contact the Internet (or any servers) in any way.  They may not access network endpoints with addresses such as http URLs. </p>
<p><strong>local-with-networking</strong>  A SWF file in this sandbox may communicate over the network but may not read from local file systems. It is the exact opposite of local-with-filesystem.</p>
<p><strong>local-trusted</strong>  This sandbox is not restricted. Any local file can be placed in this sandbox if given authorization by the end user. This authorization can come in two forms: interactively through the Settings Manager or non-interactively through an executable installer (or created manually) that creates Flash Player configuration files on the user&#8217;s computer.</p>
<h3>I added use-network=false to the compiler / flex-config file and it fixed it!</h3>
<p>That&#8217;s great, but you still need to understand what is happening.</p>
<p>When you add the &#8220;use-network=false&#8221; parameter to your compilation, you are forcing the swf into the local-with-filesystem sandbox (&#8220;user-network=true&#8221; forces local-with-networking).  This may end up giving you the desired behavior that you want, a swf that will run locally when you send it to your client or friends.  However, you may run into some issues later on.</p>
<p>What if you and your friends were competitive, and you then decided your game needs to post a high score?  You would need to make a request to a server to submit the score.  When running in the local-with-filesystem sandbox you are not able to make requests of any kind to the internet, and therefore you can&#8217;t post to the score board.</p>
<h3>So what is the solution?</h3>
<p>You could teach all of your friends how to setup their game to run in localTrusted, by configuring their security files.  But there has got to be a better way.</p>
<p>Well there is, and it all depends on how you plan to deploy your game.</p>
<h3>I want to distribute a local game.</h3>
<p>The recommended way to distribute flash games to be run locally is using the <a href="http://www.adobe.com/products/air/">Adobe AIR runtime</a>.  It&#8217;s a great platform, and gives you much more flexibility and functionality.</p>
<h3>I want to put it on a website.</h3>
<p>So the best way to test your game then would be, to put it on a website.  Now don&#8217;t get scared, this isn&#8217;t going to change your development workflow all that much.</p>
<p>The simplest way to simulate a local swf running on a website would be to have a local web-server running on you box.  I highly recommend <a href="http://www.wampserver.com/en/" target="_blank">WAMP for Windows</a>, <a href="http://www.mamp.info/en/index.html" target="_blank">MAMP for Mac OS X</a> and <a href="http://www.lamphowto.com/" target="_blank">LAMP for you Linux folk</a>.</p>
<p>You then build your game (setup your output directory to drop the files in the web root) and launch your web-browser.  Running a game swf from http://localhost will put your swf into the &#8220;remote&#8221; sandbox. You will want to do all of your testing within this sandbox, because it best mirrors the environment when you deploy your game to the web.</p>
<h3>More Information</h3>
<p>This post is just a brief overview of a very complex topic, for more information check out these resources:</p>
<p><a href="http://www.senocular.com/pub/adobe/Flash%20Player%20Security%20Basics.html" target="_blank">Flash Player Security Basics</a></p>
<p>A full hour presentation from MAX 2008 by Deneb Meketa, explaining how Flash Player Security works and why it does it that way (if you don&#8217;t want to watch the whole thing, 47:12 is where it talks about local file security).  I highly recommend everyone watch it:<br />
<a href="http://tv.adobe.com/watch/max-2008-develop/understanding-the-flash-player-security-model" target="_blank">Understanding the Flash Player Security Model</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.natebeck.net/2010/01/developing-games-with-pushbutton-engine-understanding-local-flash-player-security/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Developing games with PushButton Engine &#8211; Using the Console</title>
		<link>http://blog.natebeck.net/2009/11/developing-games-with-pushbutton-engine-using-the-console/</link>
		<comments>http://blog.natebeck.net/2009/11/developing-games-with-pushbutton-engine-using-the-console/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 09:38:10 +0000</pubDate>
		<dc:creator>Nate Beck</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[PushButton]]></category>
		<category><![CDATA[Tip of the day]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Console]]></category>
		<category><![CDATA[PBE]]></category>

		<guid isPermaLink="false">http://blog.natebeck.net/?p=888</guid>
		<description><![CDATA[One really cool feature that we have built into the PushButton Flash Game Engine is a console. Using the Console The only thing you need to do to include the Console into your project is call PBE.startup(). package &#123; import flash.display.Sprite; import com.pblabs.engine.PBE; &#160; public class HelloConsole extends Sprite &#123; public function HelloConsole&#40;&#41; &#123; PBE.startup&#40;this&#41;;]]></description>
			<content:encoded><![CDATA[<p>One really cool feature that we have built into the <a href="http://pushbuttonengine.com/">PushButton Flash Game Engine</a> is a console.</p>
<h3>Using the Console</h3>
<p>The only thing you need to do to include the Console into your project is call PBE.startup().</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">pblabs</span>.<span style="color: #006600;">engine</span>.<span style="color: #006600;">PBE</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> HelloConsole <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> HelloConsole<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			PBE.<span style="color: #006600;">startup</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Once your game is running, to access the console press the default hot key, which is the Tilde (~) / Grave (`) key. </p>
<p><a href="http://blog.natebeck.net/wp-content/uploads/2009/11/HelloConsole.png" target="_blank"><img src="http://blog.natebeck.net/wp-content/uploads/2009/11/HelloConsole-300x229.png" alt="HelloConsole" title="HelloConsole" width="300" height="229" class="alignnone size-medium wp-image-899" /></a></p>
<p>As of this post, the latest revision of the <a href="http://www.pushbuttonengine.com">PushButton Engine</a> is revision 702.  In this version there are some commands registered by default:</p>
<ul>
<li><b>help</b> &#8211; List known commands.</li>
<li><b>clear</b> &#8211; Clears the console history.</li>
<li><b>listDisplayObjects</b> &#8211; Outputs the display list.</li>
<li><b>showFps</b> &#8211; Show an FPS/Memory usage indicator.</li>
<li><b>verbose</b> &#8211; Set verbosity level of console output.</li>
<li><b>version</b> &#8211; Echo PushButton Engine version information.</li>
</ul>
<h3>Quick Tricks</h3>
<p>The console supports a few shortcuts to make your life easier:</p>
<ul>
<li>The console is not case-sensitive, so don&#8217;t worry if you put showFps or shOwFPS, the same command will execute.</li>
<li>You can use the up and down arrows to move through your command history.</li>
<li>By pressing enter on an empty command line, you can add new lines.  This is helpful for adding space between commands to make it easier to read.</li>
<li>You can use the &#8220;name&#8221; property on a DisplayObject to make meaningful names show up in the listDisplayObjects command.</li>
<li>Different Log Levels are colored by default, to change the colors edit com.pblabs.engine.debug.LogColor.</li>
</ul>
<h3>Creating custom commands for the console</h3>
<p>The PBE console also supports the ability for the developer to add their own commands.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">pblabs</span>.<span style="color: #006600;">engine</span>.<span style="color: #006600;">PBE</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">pblabs</span>.<span style="color: #006600;">engine</span>.<span style="color: #006600;">debug</span>.<span style="color: #006600;">Console</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">pblabs</span>.<span style="color: #006600;">engine</span>.<span style="color: #006600;">debug</span>.<span style="color: #006600;">Logger</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> ConsoleCommand <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> ConsoleCommand<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			PBE.<span style="color: #006600;">startup</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#41;</span>;
			Console.<span style="color: #006600;">registerCommand</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;test&quot;</span>, onTestCommand, <span style="color: #ff0000;">&quot;This is a test command.&quot;</span><span style="color: #66cc66;">&#41;</span>;
			Console.<span style="color: #006600;">registerCommand</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;testStrict&quot;</span>, onTestStrict, <span style="color: #ff0000;">&quot;Test strict parameters.&quot;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		protected <span style="color: #000000; font-weight: bold;">function</span> onTestCommand<span style="color: #66cc66;">&#40;</span>... <span style="color: #006600;">args</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			Logger.<span style="color: #0066CC;">print</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>, <span style="color: #ff0000;">&quot;onTestCommand: &quot;</span>+args<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		protected <span style="color: #000000; font-weight: bold;">function</span> onTestStrict<span style="color: #66cc66;">&#40;</span>str:<span style="color: #0066CC;">String</span>, num:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			Logger.<span style="color: #0066CC;">print</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>, <span style="color: #ff0000;">&quot;You passed in the string: &quot;</span>+str<span style="color: #66cc66;">&#41;</span>;
			Logger.<span style="color: #0066CC;">print</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>, <span style="color: #ff0000;">&quot;You passed in the number: &quot;</span>+num<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Parameters are passed in sequence using spaces.  So to run the test command, I would open the console, and then type &#8220;test a b c 1 2 3&#8243;.  This would then call the onTestCommand method and pass in an array with 6 elements.</p>
<p>Below is an example of what using custom commands in the console looks like.</p>
<p><a href="http://blog.natebeck.net/wp-content/uploads/2009/11/ConsoleCommand.png"><img src="http://blog.natebeck.net/wp-content/uploads/2009/11/ConsoleCommand-300x229.png" alt="ConsoleCommand" title="ConsoleCommand" width="300" height="229" class="alignnone size-medium wp-image-895" /></a></p>
<h3>Changing the Console HotKey</h3>
<p>Some of our good friends over in the Netherlands use different keyboard layouts, so they requested the ability to change the hot key binding to another key.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">pblabs</span>.<span style="color: #006600;">engine</span>.<span style="color: #006600;">PBE</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">pblabs</span>.<span style="color: #006600;">engine</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">InputKey</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">pblabs</span>.<span style="color: #006600;">engine</span>.<span style="color: #006600;">debug</span>.<span style="color: #006600;">Console</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">pblabs</span>.<span style="color: #006600;">engine</span>.<span style="color: #006600;">debug</span>.<span style="color: #006600;">Logger</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">pblabs</span>.<span style="color: #006600;">engine</span>.<span style="color: #006600;">debug</span>.<span style="color: #006600;">UIAppender</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">StageAlign</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">StageScaleMode</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> TestConsole <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> TestConsole<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			PBE.<span style="color: #006600;">startup</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			UIAppender.<span style="color: #006600;">hotKey</span> = InputKey.<span style="color: #006600;">C</span>.<span style="color: #006600;">keyCode</span>;
			Console.<span style="color: #006600;">registerCommand</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;test&quot;</span>, onTestCommand, <span style="color: #ff0000;">&quot;My test command&quot;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		protected <span style="color: #000000; font-weight: bold;">function</span> onTestCommand<span style="color: #66cc66;">&#40;</span>... <span style="color: #006600;">args</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			Logger.<span style="color: #0066CC;">print</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>, <span style="color: #ff0000;">&quot;onTestCommand: &quot;</span>+args<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><font color="#FF0000"><b>WARNING!!!</b></font> When changing the hot key to another key, the input textfield doesn&#8217;t escape the new key binding.  So you must remove focus from the input field to use the hot key to close the console.</p>
<p>More information on this can be found in <a href="http://code.google.com/p/pushbuttonengine/issues/detail?id=98">issue 98</a>.</p>
<h3>What&#8217;s coming?</h3>
<p>I do have plans on adding either tab-complete or a drop-down auto complete list into the console which will match avaliable commands.</p>
<p>Another thing that I&#8217;m currently working on is code-named Tumbler.  It&#8217;s and Adobe AIR version of the console which has additional features to assist in debugging and troubleshooting your games.  </p>
<p>It&#8217;s a proof-of-concept at the moment&#8230; but if there is enough interest in it&#8230; I may spend more time on it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.natebeck.net/2009/11/developing-games-with-pushbutton-engine-using-the-console/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Developing games with PushButton Engine &#8211; Part 1 &#8211; Using Flex and Flash Builder</title>
		<link>http://blog.natebeck.net/2009/10/developing-games-with-pushbutton-engine-using-flex-and-flash-builder/</link>
		<comments>http://blog.natebeck.net/2009/10/developing-games-with-pushbutton-engine-using-flex-and-flash-builder/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 05:38:47 +0000</pubDate>
		<dc:creator>Nate Beck</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[PushButton]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[Flex Builder]]></category>
		<category><![CDATA[games]]></category>

		<guid isPermaLink="false">http://blog.natebeck.net/?p=845</guid>
		<description><![CDATA[So I know I haven&#8217;t posted in quite some time. Between work, BugQuash, MAX, contributing to PushButton Engine, my country&#8217;s 500th anniversary to plan, my wedding to arrange, my wife to murder and Guilder to frame for it, I&#8217;ve been swamped. But tonight&#8230; I break my blog silence. As I just mentioned, I&#8217;ve been contributing]]></description>
			<content:encoded><![CDATA[<p>So I know I haven&#8217;t posted in quite some time.  Between work, BugQuash, MAX, contributing to PushButton Engine, my country&#8217;s 500th anniversary to plan, my wedding to arrange, my wife to murder and Guilder to frame for it, I&#8217;ve been swamped.</p>
<p>But tonight&#8230; I break my blog silence.  As I just mentioned, I&#8217;ve been contributing to the <a href="http://pushbuttonengine.com/" target="_blank">PushButton Flash Game Engine</a>.  I&#8217;m now going to show you how to set up Flex Builder 3 or Flash Builder 4 in a way that allows you to develop games on PushButton Engine, as well as how to work on the core engine itself.  I&#8217;m breaking this down into very small pieces so that everyone can follow along.  So it&#8217;s going to be a long post with lots of pretty pictures.</p>
<p>After writing this post, it ended up being longer than I hoped.  So I&#8217;m going to write a series of posts about developing games using PushButton Engine.  This post will focus only getting set up inside Flash and Flex Builder.  The plan is to add other IDEs in as well, for example FlashDevelop, FDT, etc&#8230;</p>
<h3>Step 1 : Download the PushButton Engine source code.</h3>
<p><b>[note]</b><br />
<i>If you are not familiar with Subversion or you need a primer to the basics of contributing to or working with open source projects please check out my <a href="http://blog.natebeck.net/2009/07/getting-dirty-with-the-flex-sdk-slides-and-recording/">&#8220;Getting Dirty with the Flex SDK&#8221;</a> post, more specifically the <a href="http://experts.na3.acrobat.com/p88453631/">TechWed Presentation</a>.</i><br />
<b>[/note]</b></p>
<h1><font color="#ff0000">WARNING!! For these steps to work, you must use at least revision 602 of the PushButton Engine.</font></h1>
</p>
<p>Download the PushButton Engine core from <a href="http://code.google.com/p/pushbuttonengine/source/checkout">Google Code</a>.  Since I am a developer in the engine, I have checked out trunk and all of the branches.  My working copy is located in /pbe (or C:/pbe on Windows). I will use that location throughout the rest of this post.  Make sure that if you choose a different location that you sub it in wherever I use &#8220;/pbe&#8221;.</p>
<p>So on OS X, to checkout the source code, open up Terminal and type in the following lines:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">svn</span> checkout http:<span style="color: #000000; font-weight: bold;">//</span>pushbuttonengine.googlecode.com<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span> pbe</pre></div></div>

<h3>Step 2 : Import the PBEngine Library project within Flex/Flash Builder.</h3>
<p>Open up Flex Builder (or Flash Builder), right click in the Flex Navigator and choose Import. (You can also use File > Import > Other).<br />
<a href="http://blog.natebeck.net/wp-content/uploads/2009/10/001_import.png"><img src="http://blog.natebeck.net/wp-content/uploads/2009/10/001_import-300x225.png" alt="Import Project" title="Import Project" width="300" height="225" class="size-medium wp-image-847" /></a></p>
<p>Open up the &#8220;General&#8221; folder and choose &#8220;Existing Projects into Workspace&#8221; and click &#8220;Next&#8221;.<br />
<a href="http://blog.natebeck.net/wp-content/uploads/2009/10/002_existing.png"><img src="http://blog.natebeck.net/wp-content/uploads/2009/10/002_existing-288x300.png" alt="002_existing" title="002_existing" width="288" height="300" class="alignnone size-medium wp-image-848" /></a></p>
<p>Click the &#8220;Browse&#8221; button next to &#8220;Select root directory&#8221;.<br />
<a href="http://blog.natebeck.net/wp-content/uploads/2009/10/003_rootDir.png"><img src="http://blog.natebeck.net/wp-content/uploads/2009/10/003_rootDir-300x100.png" alt="003_rootDir" title="003_rootDir" width="300" height="100" class="alignnone size-medium wp-image-849" /></a></p>
<p>In revision 600 of the PushButton Engine I added &#8220;FB3&#8243; and &#8220;FB4&#8243; directories underneath &#8220;trunk/development&#8221;.  These directories have a Flex Library project skeleton within them that can be imported directly into Flex Builder.</p>
<p>If you are using Flex Builder 3, use the FB3 directory, and if you&#8217;re using Flash Builder 4, use the FB4 directory.<br />
<a href="http://blog.natebeck.net/wp-content/uploads/2009/10/004_selectFB3.png"><img src="http://blog.natebeck.net/wp-content/uploads/2009/10/004_selectFB3-300x184.png" alt="004_selectFB3" title="004_selectFB3" width="300" height="184" class="alignnone size-medium wp-image-850" /></a></p>
<p>Click Finish.<br />
<a href="http://blog.natebeck.net/wp-content/uploads/2009/10/005_selectedPBEngine.png"><img src="http://blog.natebeck.net/wp-content/uploads/2009/10/005_selectedPBEngine-287x300.png" alt="005_selectedPBEngine" title="005_selectedPBEngine" width="287" height="300" class="alignnone size-medium wp-image-851" /></a></p>
<p>You will see a Flex Library project in the Flex Navigator now.  You will also have an error, don&#8217;t worry, we&#8217;ll fix that in the next step.</p>
<h3>Step 3 : Setup the a Linked Resource for PBE</h3>
<p>So here is the error that you will see:<br />
<i>configuration variable &#8216;compiler.source-path&#8217; value contains unknown token &#8216;PBE&#8217;</i><br />
<a href="http://blog.natebeck.net/wp-content/uploads/2009/10/006_error.png"><img src="http://blog.natebeck.net/wp-content/uploads/2009/10/006_error-300x224.png" alt="006_error" title="006_error" width="300" height="224" class="alignnone size-medium wp-image-852" /></a></p>
<p>The project skeleton uses something called a &#8220;Linked Resource&#8221;, so that it can find the PushButton Engine source files.  To set this Linked Resource, you do the following:</p>
<p>Open up Flex Builder&#8217;s preferences.<br />
<a href="http://blog.natebeck.net/wp-content/uploads/2009/10/007_preferences.png"><img src="http://blog.natebeck.net/wp-content/uploads/2009/10/007_preferences-300x214.png" alt="007_preferences" title="007_preferences" width="300" height="214" class="alignnone size-medium wp-image-853" /></a></p>
<p>Under General > Workspace > Linked Resources&#8230; Click &#8220;New&#8230;&#8221;<br />
<a href="http://blog.natebeck.net/wp-content/uploads/2009/10/008_linkedResources.png"><img src="http://blog.natebeck.net/wp-content/uploads/2009/10/008_linkedResources-300x246.png" alt="008_linkedResources" title="008_linkedResources" width="300" height="246" class="alignnone size-medium wp-image-854" /></a></p>
<p>Click on the &#8220;Folder&#8230;&#8221; button and navigate to the PushButton Engine &#8220;trunk&#8221; folder, &#8220;/pbe/trunk&#8221; (C:/pbe/trunk on Windows).<br />
<a href="http://blog.natebeck.net/wp-content/uploads/2009/10/009_selectFolder.png"><img src="http://blog.natebeck.net/wp-content/uploads/2009/10/009_selectFolder-300x140.png" alt="009_selectFolder" title="009_selectFolder" width="300" height="140" class="alignnone size-medium wp-image-855" /></a></p>
<p>Hit &#8220;OK&#8221; and you should see PBE listed in the Linked Resources now.<br />
<a href="http://blog.natebeck.net/wp-content/uploads/2009/10/010_PBEResource.png"><img src="http://blog.natebeck.net/wp-content/uploads/2009/10/010_PBEResource-300x295.png" alt="010_PBEResource" title="010_PBEResource" width="300" height="295" class="alignnone size-medium wp-image-856" /></a></p>
<p>Clean the project to incorporate and rebuild all of the changes.<br />
<a href="http://blog.natebeck.net/wp-content/uploads/2009/10/011_cleanProject.png"><img src="http://blog.natebeck.net/wp-content/uploads/2009/10/011_cleanProject-300x208.png" alt="011_cleanProject" title="011_cleanProject" width="300" height="208" class="alignnone size-medium wp-image-857" /></a></p>
<p>If you see PBEngine.swc underneath the bin folder, you are good to go!  Nice work!<br />
<a href="http://blog.natebeck.net/wp-content/uploads/2009/10/012_projectWSource.png"><img src="http://blog.natebeck.net/wp-content/uploads/2009/10/012_projectWSource-180x300.png" alt="012_projectWSource" title="012_projectWSource" width="180" height="300" class="alignnone size-medium wp-image-858" /></a></p>
<h2>:: UPDATE ::</h2>
<p>There have been file renames and other changes in the PushButton engine since this post.  If your SWC is failing to build do the following. </p>
<p>In the Flex Navigator, right click on the PBEngine Flex Library project.  Click Properties.  Go to &#8220;Flex Build Library Path&#8221;, under &#8220;Classes&#8221; uncheck [source path] src and recheck it.  If you are using Flash Builder 4, you can simply select &#8220;Include all classes from all source paths&#8221;.  Any other questions&#8230; post a comment and I&#8217;ll answer them.</p>
<h3>Step 4 : Create your game!</h3>
<p>For this example I&#8217;m going to create a VERY simple Hello World game to show that we have everything working correctly.</p>
<p>Right-click in Flex Navigator and choose &#8220;New&#8221; > &#8220;ActionScript Project&#8221;.</p>
<p>Give it a name of &#8220;HelloGame&#8221;, and click Finish.<br />
<a href="http://blog.natebeck.net/wp-content/uploads/2009/10/013_createASOnly.png"><img src="http://blog.natebeck.net/wp-content/uploads/2009/10/013_createASOnly-178x300.png" alt="013_createASOnly" title="013_createASOnly" width="178" height="300" class="alignnone size-medium wp-image-859" /></a></p>
<p>Now, to use the PBEngine Library within our HelloGame project, we need to create a link between the two.  </p>
<p>To do this, right click on the &#8220;HelloGame&#8221; project and choose &#8220;Properties&#8221;.<br />
<a href="http://blog.natebeck.net/wp-content/uploads/2009/10/014_helloProperties.png"><img src="http://blog.natebeck.net/wp-content/uploads/2009/10/014_helloProperties-175x300.png" alt="014_helloProperties" title="014_helloProperties" width="175" height="300" class="alignnone size-medium wp-image-860" /></a></p>
<p>Choose &#8220;ActionScript Build Path&#8221; from the list, and then click on &#8220;Add Project&#8230;&#8221;<br />
<a href="http://blog.natebeck.net/wp-content/uploads/2009/10/015_AddProject.png"><img src="http://blog.natebeck.net/wp-content/uploads/2009/10/015_AddProject-300x269.png" alt="015_AddProject" title="015_AddProject" width="300" height="269" class="alignnone size-medium wp-image-861" /></a></p>
<p>You should see &#8220;PBEngine&#8221; in the list.</p>
<p>If you don&#8217;t see PBEngine, or you get a message that tells you, &#8220;There are no Flex Library projects in your workspace&#8221;, make sure that a) you have created a PBEngine Library by following the previous steps and b) the project is not closed.<br />
<a href="http://blog.natebeck.net/wp-content/uploads/2009/10/016_PBEngine.png"><img src="http://blog.natebeck.net/wp-content/uploads/2009/10/016_PBEngine-300x264.png" alt="016_PBEngine" title="016_PBEngine" width="300" height="264" class="alignnone size-medium wp-image-862" /></a></p>
<p>Select &#8220;PBEngine&#8221; and click &#8220;OK&#8221;.  You will now see PBEngine listed in the Build path libraries box.<br />
<a href="http://blog.natebeck.net/wp-content/uploads/2009/10/017_withLibrary.png"><img src="http://blog.natebeck.net/wp-content/uploads/2009/10/017_withLibrary-300x258.png" alt="017_withLibrary" title="017_withLibrary" width="300" height="258" class="alignnone size-medium wp-image-863" /></a></p>
<p>Now that the two projects are linked, you can start using classes right out of the PushButton Engine.  Code completion works, and everything compiles. Woot!<br />
<a href="http://blog.natebeck.net/wp-content/uploads/2009/10/018_Intellisense.png"><img src="http://blog.natebeck.net/wp-content/uploads/2009/10/018_Intellisense-300x186.png" alt="018_Intellisense" title="018_Intellisense" width="300" height="186" class="alignnone size-medium wp-image-864" /></a></p>
<p>Great, now let&#8217;s write our impressive Hello World game.</p>
<p>Here is the source:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">pblabs</span>.<span style="color: #006600;">engine</span>.<span style="color: #006600;">PBE</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">pblabs</span>.<span style="color: #006600;">engine</span>.<span style="color: #006600;">debug</span>.<span style="color: #006600;">Logger</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> HelloGame <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> HelloGame<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			PBE.<span style="color: #006600;">startup</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#41;</span>;
			Logger.<span style="color: #0066CC;">print</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>, <span style="color: #ff0000;">&quot;Hello Nate!&quot;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Run or Debug the game.  At first you will see a blank screen, that is expected&#8230; Press the ~ (tilde or `) key, and the PushButton Console should come up.</p>
<p>The console has some commands by default: help, version, showFps and verbose (1 || 2)<br />
<a href="http://blog.natebeck.net/wp-content/uploads/2009/10/020_console.png"><img src="http://blog.natebeck.net/wp-content/uploads/2009/10/020_console-300x213.png" alt="020_console" title="020_console" width="300" height="213" class="alignnone size-medium wp-image-866" /></a></p>
<p>You can add your own custom commands to the console to assist you while developing your games&#8230; but that is a post for another time.</p>
<p>Any questions, be sure to hit us up over on the <a href="http://pushbuttonengine.com/community/">PushButton Engine Forums</a> or in the freenode IRC channel: #pbengine.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.natebeck.net/2009/10/developing-games-with-pushbutton-engine-using-flex-and-flash-builder/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Getting Dirty with the Flex SDK &#8211; Slides and Recording</title>
		<link>http://blog.natebeck.net/2009/07/getting-dirty-with-the-flex-sdk-slides-and-recording/</link>
		<comments>http://blog.natebeck.net/2009/07/getting-dirty-with-the-flex-sdk-slides-and-recording/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 20:31:37 +0000</pubDate>
		<dc:creator>Nate Beck</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[BugQuash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Flex SDK]]></category>
		<category><![CDATA[TechWed]]></category>

		<guid isPermaLink="false">http://blog.natebeck.net/?p=821</guid>
		<description><![CDATA[I&#8217;d like to thank everyone who attended my TechWed presentation yesterday. We had around 85 people in attendance! Thanks to Stacy Sison for convincing me that I should present. I will be giving this presentation again tonight at the Seattle Flex User Group, so if you are in Seattle&#8230; show up. We&#8217;ll have a bit]]></description>
			<content:encoded><![CDATA[<p>I&#8217;d like to thank everyone who attended my TechWed presentation yesterday.  We had around 85 people in attendance! Thanks to Stacy Sison for convincing me that I should present.</p>
<p>I will be giving this presentation again tonight at the <a href="http://www.seaflexug.org">Seattle Flex User Group</a>, so if you are in Seattle&#8230; show up.  We&#8217;ll have a bit more time for questions at tonight&#8217;s presentation.</p>
<h3>:: PRESENTATION MATERIALS ::</h3>
<p><a href="http://www.slideshare.net/natebeck/getting-dirty-with-the-flex-sdk" >Slides</a><br />
<a href="http://experts.na3.acrobat.com/p88453631/" target="_blank">TechWed Presentation</a><br />
<a href="https://admin.adobe.acrobat.com/_a200985228/p67639112/">FlexMeetup.com Presentation</a></p></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.natebeck.net/2009/07/getting-dirty-with-the-flex-sdk-slides-and-recording/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>The Flash Builder 4 and Flash Catalyst Betas Are Out!!</title>
		<link>http://blog.natebeck.net/2009/05/the-flash-builder-4-and-flash-catalyst-betas-are-out/</link>
		<comments>http://blog.natebeck.net/2009/05/the-flash-builder-4-and-flash-catalyst-betas-are-out/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 05:21:27 +0000</pubDate>
		<dc:creator>Nate Beck</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[Flash Catalyst]]></category>

		<guid isPermaLink="false">http://blog.natebeck.net/?p=784</guid>
		<description><![CDATA[So I was going to write a great long blog post about how the Flash Catalyst and Flash Builder 4 betas are out&#8230; and resources you can use get started&#8230; But Ryan Stewart and Serge Jespers have both written amazing posts already. So all of you should do as I&#8217;m doing, and go download the]]></description>
			<content:encoded><![CDATA[<p>So I was going to write a great long blog post about how the <a href="http://labs.adobe.com/technologies/flashcatalyst/" target="_blank">Flash Catalyst</a> and <a href="http://labs.adobe.com/technologies/flashbuilder4/" target="_blank">Flash Builder 4</a> betas are out&#8230; and resources you can use get started&#8230; But <a href="http://blog.digitalbackcountry.com/2009/05/flash-builder-and-flash-catalyst-betas-now-available/" target="_blank">Ryan Stewart</a> and <a href="http://www.webkitchen.be/2009/05/31/get-your-flash-catalyst-flash-builder-beta-now/" target="_blank">Serge Jespers</a> have both written amazing posts already.  So all of you should do as I&#8217;m doing, and go download the betas and start finding bugs!!</p>
<p>I do give huge props to Adobe for releasing both of these betas in &#8220;June&#8221; <a href="http://forums.adobe.com/thread/439433?tstart=0" target="_blank">as they said they would</a>.  To be quite honest, it&#8217;s still technically May here in Seattle.  Great work Adobe, another job well done.  *slow clap*</p>
<h3>:: UPDATE ::</h3>
<p>Also, major props to the Flex SDK team for getting the beta out even with all of the Fx prefix madness that has been going on. </p>
<h3>:: UPDATE 2 ::</h3>
<p>Adobe Developer Connection has posted a list of informational links about Flash Builder 4, Flex 4 SDK and Flash Catalyst.  <a href="http://blogs.adobe.com/adc/2009/06/new_content_for_flex_4_sdk_bet.html" target="_blank">Check it out</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.natebeck.net/2009/05/the-flash-builder-4-and-flash-catalyst-betas-are-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tip of the Day &#8211; How to create a prompt field on your mx:ComboBox</title>
		<link>http://blog.natebeck.net/2009/04/tip-of-the-day-how-to-create-a-prompt-field-on-your-mxcombobox/</link>
		<comments>http://blog.natebeck.net/2009/04/tip-of-the-day-how-to-create-a-prompt-field-on-your-mxcombobox/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 08:55:55 +0000</pubDate>
		<dc:creator>Nate Beck</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Tip of the day]]></category>
		<category><![CDATA[ComboBox]]></category>

		<guid isPermaLink="false">http://blog.natebeck.net/?p=772</guid>
		<description><![CDATA[For a long time I&#8217;ve been doing things like this within Flex. &#91;Bindable&#93; private var _skills:Array = &#91; &#123;label: &#34;---&#34;, id: -1&#125;, &#123;label: &#34;1 - Newbie&#34;, id: 1&#125;, &#123;label: &#34;2 - Some Experience&#34;, id: 2&#125;, &#123;label: &#34;3 - Expert&#34;, id: 3&#125;, &#123;label: &#34;4 - I'm a baller&#34;, id: 4&#125; &#93;; And then binding this data]]></description>
			<content:encoded><![CDATA[<p>For a long time I&#8217;ve been doing things like this within Flex.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #66cc66;">&#91;</span>Bindable<span style="color: #66cc66;">&#93;</span> <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _skills:<span style="color: #0066CC;">Array</span> = 
<span style="color: #66cc66;">&#91;</span>
	<span style="color: #66cc66;">&#123;</span>label: <span style="color: #ff0000;">&quot;---&quot;</span>, id: -<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#125;</span>,
	<span style="color: #66cc66;">&#123;</span>label: <span style="color: #ff0000;">&quot;1 - Newbie&quot;</span>, id: <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#125;</span>,
	<span style="color: #66cc66;">&#123;</span>label: <span style="color: #ff0000;">&quot;2 - Some Experience&quot;</span>, id: <span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#125;</span>,
	<span style="color: #66cc66;">&#123;</span>label: <span style="color: #ff0000;">&quot;3 - Expert&quot;</span>, id: <span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#125;</span>,
	<span style="color: #66cc66;">&#123;</span>label: <span style="color: #ff0000;">&quot;4 - I'm a baller&quot;</span>, id: <span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#93;</span>;</pre></div></div>

<p>And then binding this data provider to a ComboBox&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:ComboBox</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;skillsCB&quot;</span> <span style="color: #000066;">dataProvider</span>=<span style="color: #ff0000;">&quot;{_skills}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>

<p>Well it turns out there is a much easier way of doing this that I never knew of until today.  ComboBox has a &#8220;prompt&#8221; attribute that you can set.  It&#8217;s so easy&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:ComboBox</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;skillsCB&quot;</span> <span style="color: #000066;">dataProvider</span>=<span style="color: #ff0000;">&quot;{_skills}&quot;</span> <span style="color: #000066;">prompt</span>=<span style="color: #ff0000;">&quot;---&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>

<p>I told you it was easy.  Can&#8217;t believe I never noticed it before.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.natebeck.net/2009/04/tip-of-the-day-how-to-create-a-prompt-field-on-your-mxcombobox/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Late-night programming</title>
		<link>http://blog.natebeck.net/2009/03/late-night-programming/</link>
		<comments>http://blog.natebeck.net/2009/03/late-night-programming/#comments</comments>
		<pubDate>Fri, 27 Mar 2009 03:11:27 +0000</pubDate>
		<dc:creator>Nate Beck</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[BugQuash]]></category>
		<category><![CDATA[Randomness]]></category>

		<guid isPermaLink="false">http://blog.natebeck.net/?p=763</guid>
		<description><![CDATA[package &#123; import net.natebeck.Nate; import net.natebeck.events.NateEvent; import com.bugquash.Project; import flash.event.Event; &#160; public class BugQuash &#123; protected var pokeCount:int; protected var baller:Nate; &#160; public function BugQuash&#40;&#41; &#123; baller = new Nate&#40;&#41;; &#160; baller.addEventListener&#40;NateEvent.GETTING_TIRED, onGettingTired&#41;; baller.addEventListener&#40;Event.COMPLETE, onComplete&#41;; &#160; baller.generateCode&#40;Project.QUASHBOARD&#41;; baller.generateCode&#40;Project.QUASHBOARD_ADMIN&#41;; baller.generateCode&#40;Project.SERVER_LOGIC&#41;; &#160; baller.loadTest&#40;Project.SERVER_LOGIC&#41;; &#125; &#160; protected function onGettingTired&#40;event:NateEvent&#41;:void &#123; baller.caffinate&#40;&#41;; &#125; &#160; protected function onComplete&#40;event:Event&#41;:void &#123; baller.sleep&#40;&#41;;]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> net.<span style="color: #006600;">natebeck</span>.<span style="color: #006600;">Nate</span>;
	<span style="color: #0066CC;">import</span> net.<span style="color: #006600;">natebeck</span>.<span style="color: #006600;">events</span>.<span style="color: #006600;">NateEvent</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">bugquash</span>.<span style="color: #006600;">Project</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">event</span>.<span style="color: #006600;">Event</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> BugQuash
	<span style="color: #66cc66;">&#123;</span>
		protected <span style="color: #000000; font-weight: bold;">var</span> pokeCount:<span style="color: #0066CC;">int</span>;
		protected <span style="color: #000000; font-weight: bold;">var</span> baller:Nate;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> BugQuash<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			baller = <span style="color: #000000; font-weight: bold;">new</span> Nate<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			baller.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>NateEvent.<span style="color: #006600;">GETTING_TIRED</span>, onGettingTired<span style="color: #66cc66;">&#41;</span>;
			baller.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">COMPLETE</span>, onComplete<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			baller.<span style="color: #006600;">generateCode</span><span style="color: #66cc66;">&#40;</span>Project.<span style="color: #006600;">QUASHBOARD</span><span style="color: #66cc66;">&#41;</span>;
			baller.<span style="color: #006600;">generateCode</span><span style="color: #66cc66;">&#40;</span>Project.<span style="color: #006600;">QUASHBOARD_ADMIN</span><span style="color: #66cc66;">&#41;</span>;
			baller.<span style="color: #006600;">generateCode</span><span style="color: #66cc66;">&#40;</span>Project.<span style="color: #006600;">SERVER_LOGIC</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			baller.<span style="color: #006600;">loadTest</span><span style="color: #66cc66;">&#40;</span>Project.<span style="color: #006600;">SERVER_LOGIC</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		protected <span style="color: #000000; font-weight: bold;">function</span> onGettingTired<span style="color: #66cc66;">&#40;</span>event:NateEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			baller.<span style="color: #006600;">caffinate</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		protected <span style="color: #000000; font-weight: bold;">function</span> onComplete<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			baller.<span style="color: #006600;">sleep</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> poke<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>++pokeCount <span style="color: #66cc66;">&lt;</span> <span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#41;</span> 
			<span style="color: #66cc66;">&#123;</span>
				baller.<span style="color: #006600;">say</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Ouch!&quot;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
			<span style="color: #b1b100;">else</span> 
			<span style="color: #66cc66;">&#123;</span>
				baller.<span style="color: #006600;">say</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Hey... that's kind of nice&quot;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.natebeck.net/2009/03/late-night-programming/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

