<?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>Flassari.is</title>
	<atom:link href="http://flassari.is/feed/" rel="self" type="application/rss+xml" />
	<link>http://flassari.is</link>
	<description></description>
	<lastBuildDate>Thu, 28 Mar 2013 09:07:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>Managing your playerglobals and SDKs</title>
		<link>http://flassari.is/2013/03/managing-your-playerglobals-and-sdks/</link>
		<comments>http://flassari.is/2013/03/managing-your-playerglobals-and-sdks/#comments</comments>
		<pubDate>Thu, 28 Mar 2013 09:07:31 +0000</pubDate>
		<dc:creator>Flassari</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[FlexSDK]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[playerglobal]]></category>
		<category><![CDATA[SDK]]></category>

		<guid isPermaLink="false">http://flassari.is/?p=569</guid>
		<description><![CDATA[If you have multiple versions of the Flex/Air SDK on your computer it can sometimes become a hassle to make sure that every SDK has all the playerglobal.swc files for all the versions that you need to compile for. What I recommend is creating a /flex directory in your preferred location (mine is on the [...]]]></description>
			<content:encoded><![CDATA[<p>If you have multiple versions of the Flex/Air SDK on your computer it can sometimes become a hassle to make sure that every SDK has all the playerglobal.swc files for all the versions that you need to compile for.</p>
<p>What I recommend is creating a /flex directory in your preferred location (mine is on the root of C:) where you have all your SDKs, and put a folder there called /playerglobals where you have all your versions of playerglobal that you will need.<br />
Then delete the FlexSDK_x.x.x/frameworks/libs/player folder from every SDK and replace it with a Directory Junction (hard) link, which you can do with the following command (Windows):</p>
<pre>mklink /J C:\flex\FlexSDK_x.x.x\frameworks\libs\player c:\flex\playerglobals</pre>
<p>Now you have only one place to worry about your playerglobals.</p>
]]></content:encoded>
			<wfw:commentRss>http://flassari.is/2013/03/managing-your-playerglobals-and-sdks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Your flash content will not work in Windows 8</title>
		<link>http://flassari.is/2012/10/your-flash-content-will-not-work-in-windows-8/</link>
		<comments>http://flassari.is/2012/10/your-flash-content-will-not-work-in-windows-8/#comments</comments>
		<pubDate>Thu, 11 Oct 2012 19:22:48 +0000</pubDate>
		<dc:creator>Flassari</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[internet explorer 10]]></category>
		<category><![CDATA[metro]]></category>
		<category><![CDATA[microsoft]]></category>

		<guid isPermaLink="false">http://flassari.is/?p=533</guid>
		<description><![CDATA[NOTICE: This no longer applies, flash is now enabled by default (hooray!) Or to be specific, it will not work in the Metro Internet Explorer 10 browser. According to this MSDN article, your flash content will not be displayed unless it has been whitelisted by Microsoft. If you want users to be able to see [...]]]></description>
			<content:encoded><![CDATA[<p><strong>NOTICE: This no longer applies, flash is now <a rhef="http://techcrunch.com/2013/03/11/after-previously-blocking-it-microsoft-now-enables-flash-by-default-on-ie10-for-windows-8-and-rt/">enabled by default</a> (hooray!)</strong></p>
<p>Or to be specific, it will not work in the Metro Internet Explorer 10 browser.</p>
<p>According to <a href="http://msdn.microsoft.com/en-us/library/ie/jj193557%28v=vs.85%29.aspx" target="_blank">this MSDN article</a>, your flash content will not be displayed unless it has been whitelisted by Microsoft.<br />
If you want users to be able to see your flash content you have two options:</p>
<ol>
<li>Add the http header<br />
&#8220;<strong>X-UA-Compatible: requiresActiveX=true</strong>&#8221;<br />
or the meta tag<br />
&#8220;<strong>&lt;meta http-equiv=&#8221;X-UA-Compatible&#8221; content=&#8221;requiresActiveX=true&#8221; /&gt;</strong>&#8221;<br />
to your site, which will prompt the user to open the page in Desktop IE.<br/><img width="400" style="border: 1px solid black;" src="http://i.msdn.microsoft.com/dynimg/IC593529.png" alt="IE10 Prompt"/></li>
<li><a href="http://msdn.microsoft.com/en-us/library/ie/jj193557%28v=vs.85%29.aspx" target="_blank">Send an email</a> to Microsoft and request your page to be whitelisted, which can take up to 6 weeks + 1 month to get into effect.<br />
<span style="color: #808080">&#8220;Microsoft will process the developer&#8217;s request in approximately six (6) weeks&#8221;<br />
&#8220;Sites accepted onto the CV list will be included in the next regular update of the CV list, which Microsoft updates to end users of Windows 8, typically one time per month.&#8221;</span></li>
</ol>
<p>Windows 8 is coming out <a href="http://windowsteamblog.com/windows/b/bloggingwindows/archive/2012/07/18/windows-8-will-be-available-on.aspx" target="_blank">on October 26<sup>th</sup></a>, is your webpage ready?</p>
]]></content:encoded>
			<wfw:commentRss>http://flassari.is/2012/10/your-flash-content-will-not-work-in-windows-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switch-case for object&#8217;s class type</title>
		<link>http://flassari.is/2012/08/switch-case-for-objects-class-type/</link>
		<comments>http://flassari.is/2012/08/switch-case-for-objects-class-type/#comments</comments>
		<pubDate>Fri, 31 Aug 2012 08:00:40 +0000</pubDate>
		<dc:creator>Flassari</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[case]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[constructor]]></category>
		<category><![CDATA[object]]></category>
		<category><![CDATA[switch]]></category>
		<category><![CDATA[type]]></category>
		<category><![CDATA[typeof]]></category>

		<guid isPermaLink="false">http://flassari.is/?p=523</guid>
		<description><![CDATA[Quick tip; instead of using a bunch of &#8220;if (x is y) else if (x is z) else&#8221; conditionals, you can simply get the class of any object using the &#8220;constructor&#8221; property. It&#8217;s not exposed trough strict typing though, so you have to typecast your instance to Object to access it. This allows you to [...]]]></description>
			<content:encoded><![CDATA[<p>Quick tip; instead of using a bunch of &#8220;if (x is y) else if (x is z) else&#8221; conditionals, you can simply get the class of any object using the &#8220;constructor&#8221; property. It&#8217;s not exposed trough strict typing though, so you have to typecast your instance to Object to access it.</p>
<p>This allows you to have a switch-case for an object&#8217;s class:</p>
<pre class="brush: as3">function addShape(shape:Shape):void {
	switch (Object(shape).constructor) {
		case Circle:
			trace("It's a circle");
			break;
		case Square:
			trace("It's a square");
			break;
		default:
			trace("Unknown shape");
	}
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://flassari.is/2012/08/switch-case-for-objects-class-type/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mouse scroll wheel in flash not working in Chrome</title>
		<link>http://flassari.is/2012/08/mouse-scroll-wheel-in-flash-not-working-in-chrome/</link>
		<comments>http://flassari.is/2012/08/mouse-scroll-wheel-in-flash-not-working-in-chrome/#comments</comments>
		<pubDate>Tue, 14 Aug 2012 08:49:35 +0000</pubDate>
		<dc:creator>Flassari</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[mouse]]></category>
		<category><![CDATA[NPAPI]]></category>
		<category><![CDATA[pepper]]></category>
		<category><![CDATA[PPAPI]]></category>
		<category><![CDATA[preventDefault]]></category>
		<category><![CDATA[returnValue]]></category>
		<category><![CDATA[scroll]]></category>
		<category><![CDATA[SwfWheel]]></category>
		<category><![CDATA[wheel]]></category>

		<guid isPermaLink="false">http://flassari.is/?p=510</guid>
		<description><![CDATA[Chrome&#8217;s latest update to version 21 introduced a new type of flash player using the PPAPI (pepper) plugin architecture. I noticed that this version of flash started breaking mouse scroll wheel support for some flash content. Which flash files break and which don&#8217;t depend on one thing; if you are using JavaScript to prevent the [...]]]></description>
			<content:encoded><![CDATA[<p>Chrome&#8217;s latest update to version 21 introduced a <a href="http://chrome.blogspot.fi/2012/08/an-even-more-secure-flash-player-for.html">new type of flash player</a> using the <a href="http://en.wikipedia.org/wiki/NPAPI#PPAPI">PPAPI</a> (pepper) plugin architecture.<br />
I noticed that this version of flash started breaking mouse scroll wheel support for some flash content.</p>
<p>Which flash files break and which don&#8217;t depend on one thing; if you are using JavaScript to prevent the default behavior of the mouse scroll wheel or not.</p>
<p>The reason for preventing default mouse scroll wheel behavior is for when you don&#8217;t want the page to scroll when you scroll over the flash content.<br />
To prevent that, developers write JavaScript code (or use libraries like <a href="http://www.libspark.org/wiki/SWFWheel/en">SwfWheel.js</a>) that add an event listener for the &#8220;mousewheel&#8221; or &#8220;DOMMouseScroll&#8221; event, and in the handler call &#8220;<em>evt.preventDefault()</em>&#8221; and/or &#8220;<em>evt.returnValue = false</em>&#8221; to cancel the scroll.</p>
<p>Therein lies the problem, the old NPAPI Flash Player would receive the mouse scroll event even if we prevented the default behavior. Maybe even incorrectly so, since the event was cancelled.<br />
The new PPAPI Flash Player will not receive the event if the default is prevented.</p>
<p>If one were to remove the preventDefault() function, the Flash file would start working correctly again, but the whole page would again start scrolling, which is out of the question.</p>
<p>You will have to not only prevent the default scroll behavior, but also call an external interface function in your flash file to let it know when the user scrolls the mouse wheel.<br />
In my case I was using SwfWheel and only needed a small modification to the library file: in the SWFWheel.getState() function add this code before the &#8220;<em>if (br.mac)</em>&#8221; line:</p>
<pre class="brush:as3">// The new pepper plugin requires chrome to always be hacked.
if (br.chrome)
{
	return STATE_HACKED;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://flassari.is/2012/08/mouse-scroll-wheel-in-flash-not-working-in-chrome/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>VerifyError: Error #1024: Stack underflow occurred.</title>
		<link>http://flassari.is/2012/07/verifyerror-error-1024-stack-underflow-occurred/</link>
		<comments>http://flassari.is/2012/07/verifyerror-error-1024-stack-underflow-occurred/#comments</comments>
		<pubDate>Tue, 31 Jul 2012 07:42:09 +0000</pubDate>
		<dc:creator>Flassari</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[FlexSDK]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[flex compiler]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[stack]]></category>
		<category><![CDATA[throw]]></category>
		<category><![CDATA[trace]]></category>
		<category><![CDATA[try]]></category>
		<category><![CDATA[underflow]]></category>

		<guid isPermaLink="false">http://flassari.is/?p=498</guid>
		<description><![CDATA[I just completed hunting down a Stack underflow error. It was a little tedious since the error is not thrown when I compiled for debug player, only release. The source of it? A trace statement in a try block. For some reason the compiler doesn&#8217;t like that at all. The solution seemed to be to [...]]]></description>
			<content:encoded><![CDATA[<p>I just completed hunting down a Stack underflow error. It was a little tedious since the error is not thrown when I compiled for debug player, only release.<br />
The source of it? A trace statement in a try block. For some reason the compiler doesn&#8217;t like that at all.</p>
<p>The solution seemed to be to remove all traces from try-catch blocks, which worked, but I wasn&#8217;t satisfied.</p>
<p>After binary searching trough the svn commits, I found what triggered the above error, <b>an empty for-each loop</b>.<br />
Removing that loop made all traces work again normally inside try-catch blocks, which is what I prefer.</p>
<pre class="brush: as3">for each (var fruit:String in fruits) {
   // Empty loop, a BIG NO NO!
}</pre>
<p>So to prevent your swf from corrupting, <b>do not have empty for-each loops in your project!</b> Remove them completely or fill them with some code.</p>
]]></content:encoded>
			<wfw:commentRss>http://flassari.is/2012/07/verifyerror-error-1024-stack-underflow-occurred/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Throwing an error in a constructor before the super() statement</title>
		<link>http://flassari.is/2012/04/throwing-an-error-in-a-constructor-before-the-super-statement/</link>
		<comments>http://flassari.is/2012/04/throwing-an-error-in-a-constructor-before-the-super-statement/#comments</comments>
		<pubDate>Fri, 13 Apr 2012 11:51:54 +0000</pubDate>
		<dc:creator>Flassari</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[1201]]></category>
		<category><![CDATA[constructor]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[flex compiler]]></category>
		<category><![CDATA[super]]></category>
		<category><![CDATA[throw]]></category>

		<guid isPermaLink="false">http://flassari.is/?p=492</guid>
		<description><![CDATA[I would have thought you could throw an error whenever you pleased like it, however the Flex compiler has some other ideas. If you have a throw statement before the super() in the constructor, Flex will complain with the following error code: 1201: A super statement cannot occur after a this, super, return, or throw [...]]]></description>
			<content:encoded><![CDATA[<p>I would have thought you could throw an error whenever you pleased like it, however the Flex compiler has some other ideas.</p>
<p>If you have a throw statement before the super() in the constructor, Flex will complain with the following error code:<br />
<b><i>1201: A super statement cannot occur after a this, super, return, or throw statement.</i></b></p>
<p>There is a workaround though, just wrap the throw statement in an anonymous function:</p>
<pre class="brush: as3">(function():void {
	throw new Error("Yay for workarounds!");
})();</pre>
]]></content:encoded>
			<wfw:commentRss>http://flassari.is/2012/04/throwing-an-error-in-a-constructor-before-the-super-statement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>External Interface error: Object expected</title>
		<link>http://flassari.is/2012/02/external-interface-error-object-expected/</link>
		<comments>http://flassari.is/2012/02/external-interface-error-object-expected/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 14:38:43 +0000</pubDate>
		<dc:creator>Flassari</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Stage3D]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[external interface]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[FB.ui]]></category>
		<category><![CDATA[hideFlashCallback]]></category>
		<category><![CDATA[Object expected]]></category>
		<category><![CDATA[swf]]></category>
		<category><![CDATA[visibility]]></category>

		<guid isPermaLink="false">http://flassari.is/?p=480</guid>
		<description><![CDATA[It&#8217;s taken me a while to figure this one out. I have a flash game on facebook that uses Stage3D, so window mode has to be set to &#8220;direct&#8221; which means that any time facebook wants to overlay some elements on the page they appear under the game on many browsers. Facebook has a solution [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s taken me a while to figure this one out. I have a <a href="http://facebook.angrybirds.com" target="_blank">flash game on facebook</a> that uses Stage3D, so window mode has to be set to &#8220;direct&#8221; which means that any time facebook wants to overlay some elements on the page they appear under the game on many browsers.</p>
<p>Facebook has a solution for you, on FB.init you can set your own callback function via the hideFlashCallback parameter. In this callback you <a href="http://developers.facebook.com/blog/post/637/" target="_blank">can move the flash object out of view</a> by, for example, setting the top to be -10000px whenever a Facebook dialog is opened and then putting it back when the dialog is closed.</p>
<p>I had functions registered with external interface to pause and resume the game that would get called via javascript in the hideFlashCallback callback.</p>
<p>This was working well enough but for some reason on Internet Explorer I couldn&#8217;t call the resume() function just after showing the flash object, instead I got an &#8220;Object Expected&#8221; error.</p>
<p>Internet Explorer does not support calling external interface methods for flash objects if they are not visible. Since it could be a race condition (DOM might not render the flash object before the function was called) I added a 100ms delay to the call to resume(), only for IE. This seemed to work fine.</p>
<p>But once we got close to production this error re-appeared, but only when Facebook&#8217;s purchase dialog had been shown. Weird! No amount of delay made the external interface calls work again. If I showed the purchase dialog once and closed it, it would be no longer possible to call any external interface functions for the flash object until a page refresh. This was not acceptable.</p>
<p>After a lot of debugging, I noticed that even though we have registered for the hideFlashCallback function, facebook STILL sets the visibility of the flash object to &#8220;hidden&#8221; after 200ms.</p>
<p>As can be seen in <a href="https://developers.facebook.com/docs/reference/javascript/#hide_flash_callback" target="_blank">Facebook&#8217;s documentation</a>: &#8220;The custom action must complete within 200ms or the Flash object will be hidden automatically regardless.&#8221;</p>
<p>Apparently the fact that we&#8217;re changing the visibility of the flash object along with whatever facebook does differently during the purchase dialog (overlay a white div over the whole page) breaks all external interface functionality.</p>
<p>This has a simple fix though, create a higher priority CSS rule that makes the flash object always visible:</p>
<pre class="brush: xml">
<style>
#MyFlashObjectID {
    visibility: visible !important;
}
</style>
</pre>
<p>It doesn&#8217;t need to be hidden since we are moving it out of view ourselves anyways.</p>
]]></content:encoded>
			<wfw:commentRss>http://flassari.is/2012/02/external-interface-error-object-expected/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Showing static variables in the Flash Builder 4.5 debugger</title>
		<link>http://flassari.is/2012/01/showing-static-variables-in-the-flash-builder-4-5-debugger/</link>
		<comments>http://flassari.is/2012/01/showing-static-variables-in-the-flash-builder-4-5-debugger/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 08:15:16 +0000</pubDate>
		<dc:creator>Flassari</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[builder]]></category>
		<category><![CDATA[debugger]]></category>
		<category><![CDATA[show]]></category>
		<category><![CDATA[static]]></category>
		<category><![CDATA[variables]]></category>

		<guid isPermaLink="false">http://flassari.is/?p=472</guid>
		<description><![CDATA[For some reason this option is turned off by default. To see the static variables of your classes, simply click the small down-facing triangle on the top-right of the variables panel, and click Flex->Show Static Variables.]]></description>
			<content:encoded><![CDATA[<p>For some reason this option is turned off by default.<br />
To see the static variables of your classes, simply click the small down-facing triangle on the top-right of the variables panel, and click Flex->Show Static Variables.</p>
<p><img src="http://flassari.is/wp-content/uploads/2012/01/Static.png" alt="Show static variables in Flash Builder" title="Show static variables in Flash Builder" width="433" height="175" class="alignnone size-full wp-image-473" /></p>
]]></content:encoded>
			<wfw:commentRss>http://flassari.is/2012/01/showing-static-variables-in-the-flash-builder-4-5-debugger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Angry Birds coming to Facebook</title>
		<link>http://flassari.is/2012/01/angry-birds-coming-to-facebook/</link>
		<comments>http://flassari.is/2012/01/angry-birds-coming-to-facebook/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 17:53:44 +0000</pubDate>
		<dc:creator>Flassari</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[angry birds]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[rovio]]></category>

		<guid isPermaLink="false">http://flassari.is/?p=463</guid>
		<description><![CDATA[Finally, I&#8217;ve been working as a Senior Developer on the Angry Birds facebook game for a few months now, and its been announced! Rovio has created an official facebook event at http://www.facebook.com/events/174654275973227/. After the workload decreases I should be able to start writing again, I have some PureMVC stuff I&#8217;m dying to write about.]]></description>
			<content:encoded><![CDATA[<p>Finally, I&#8217;ve been working as a Senior Developer on the Angry Birds facebook game for a few months now, and its been announced!<br />
Rovio has created an official facebook event at <a href="http://www.facebook.com/events/174654275973227/">http://www.facebook.com/events/174654275973227/</a>.</p>
<p><img src="http://flassari.is/wp-content/uploads/2012/01/AngryBirdsFacebook.jpg" alt="Angry Birds on Facebook" title="Angry Birds on Facebook" width="180" height="180" class="alignnone size-full wp-image-466" /></p>
<p>After the workload decreases I should be able to start writing again, I have some PureMVC stuff I&#8217;m dying to write about.</p>
<p><iframe width="450" height="259" src="http://www.youtube.com/embed/qS0NQ3CtKhg" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://flassari.is/2012/01/angry-birds-coming-to-facebook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error #3692: All buffers need to be cleared every frame before drawing</title>
		<link>http://flassari.is/2011/11/error-3692-all-buffers-need-to-be-cleared-every-frame-before-drawing/</link>
		<comments>http://flassari.is/2011/11/error-3692-all-buffers-need-to-be-cleared-every-frame-before-drawing/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 09:12:26 +0000</pubDate>
		<dc:creator>Flassari</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[3692]]></category>
		<category><![CDATA[bitmap]]></category>
		<category><![CDATA[bitmapdata]]></category>
		<category><![CDATA[buffer]]></category>
		<category><![CDATA[buffers]]></category>
		<category><![CDATA[context3d]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[screenshot]]></category>
		<category><![CDATA[Starling]]></category>

		<guid isPermaLink="false">http://flassari.is/?p=457</guid>
		<description><![CDATA[So I have this Starling project and wanted to take a screenshot of the Stage3D currently in use. I was trying to use the Context3D.drawToBitmapData() function and kept getting this error: &#8220;Error #3692: All buffers need to be cleared every frame before drawing.&#8221; Googling around yielded no results, so after figuring out the problem I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>So I have this Starling project and wanted to take a screenshot of the Stage3D currently in use.<br />
I was trying to use the Context3D.drawToBitmapData() function and kept getting this error:<br />
&#8220;Error #3692: All buffers need to be cleared every frame before drawing.&#8221;</p>
<p>Googling around yielded no results, so after figuring out the problem I&#8217;m posting the solution here for anyone else having this problem.</p>
<p>The solution is short: you have to call drawToBitmapData() BEFORE the Context3D.present() call.</p>
<p>In my case with Starling I had to add the functionality in the Starling.render() function, between the call to mStage.render() and the call to mContext.present().</p>
]]></content:encoded>
			<wfw:commentRss>http://flassari.is/2011/11/error-3692-all-buffers-need-to-be-cleared-every-frame-before-drawing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
